Add all dashboard projects
14
test/MES_Manage_View_V20/.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
test/MES_Manage_View_V20/.eslintignore
Normal file
@@ -0,0 +1,5 @@
|
||||
build/*.js
|
||||
config/*.js
|
||||
src/assets
|
||||
src/icon
|
||||
src/views/ProjectManagement
|
||||
207
test/MES_Manage_View_V20/.eslintrc.js
Normal file
@@ -0,0 +1,207 @@
|
||||
module.exports = {
|
||||
root: true,
|
||||
parser: 'vue-eslint-parser',
|
||||
parserOptions: {
|
||||
parser: '@babel/eslint-parser', // 或者 'babel-eslint'
|
||||
ecmaVersion: 2020,
|
||||
sourceType: 'module'
|
||||
},
|
||||
env: {
|
||||
browser: true,
|
||||
node: true,
|
||||
es6: true
|
||||
},
|
||||
extends: ['plugin:vue/recommended', 'eslint:recommended', 'plugin:vue/essential'],
|
||||
|
||||
// add your custom rules here
|
||||
// it is base on https://github.com/vuejs/eslint-config-vue
|
||||
rules: {
|
||||
'no-useless-template-attributes': 'off',
|
||||
'vue/max-attributes-per-line': [2, {
|
||||
'singleline': 10,
|
||||
'multiline': {
|
||||
'max': 1,
|
||||
'allowFirstLine': false
|
||||
}
|
||||
}],
|
||||
'vue/name-property-casing': ['error', 'PascalCase'],
|
||||
'vue/html-closing-bracket-spacing': ['off', {
|
||||
'startTag': 'never',
|
||||
'endTag': 'never',
|
||||
'selfClosingTag': 'never'
|
||||
}],
|
||||
'vue/singleline-html-element-content-newline': 'off',
|
||||
'vue/multiline-html-element-content-newline': 'off',
|
||||
'vue/html-closing-bracket-newline ': 'off',
|
||||
'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': ['off', {
|
||||
'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
test/MES_Manage_View_V20/.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
test/MES_Manage_View_V20/.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
test/MES_Manage_View_V20/.travis.yml
Normal file
@@ -0,0 +1,5 @@
|
||||
language: node_js
|
||||
node_js: stable
|
||||
script: npm run test
|
||||
notifications:
|
||||
email: false
|
||||
21
test/MES_Manage_View_V20/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.
|
||||
19
test/MES_Manage_View_V20/babel.config.js
Normal file
@@ -0,0 +1,19 @@
|
||||
module.exports = {
|
||||
presets: [
|
||||
[
|
||||
'@babel/preset-env',
|
||||
{
|
||||
modules: false,
|
||||
targets: {
|
||||
browsers: ['> 1%', 'last 2 versions', 'not ie <= 8']
|
||||
},
|
||||
useBuiltIns: 'usage',
|
||||
corejs: 3
|
||||
}
|
||||
]
|
||||
],
|
||||
plugins: [
|
||||
'babel-plugin-transform-vue-jsx',
|
||||
'@babel/plugin-transform-runtime'
|
||||
]
|
||||
}
|
||||
44
test/MES_Manage_View_V20/build/build.js
Normal file
@@ -0,0 +1,44 @@
|
||||
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"
|
||||
)
|
||||
)
|
||||
})
|
||||
})
|
||||
63
test/MES_Manage_View_V20/build/check-versions.js
Normal file
@@ -0,0 +1,63 @@
|
||||
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
test/MES_Manage_View_V20/build/logo.png
Normal file
|
After Width: | Height: | Size: 6.7 KiB |
99
test/MES_Manage_View_V20/build/utils.js
Normal file
@@ -0,0 +1,99 @@
|
||||
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,
|
||||
importLoaders: 2 // 确保 postcss 和 sass 加载器正常工作
|
||||
}
|
||||
}
|
||||
|
||||
const postcssLoader = {
|
||||
loader: 'postcss-loader',
|
||||
options: {
|
||||
sourceMap: options.sourceMap,
|
||||
postcssOptions: {
|
||||
plugins: [
|
||||
require('autoprefixer')()
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function generateLoaders(loader, loaderOptions) {
|
||||
const loaders = options.usePostCSS ? [cssLoader, postcssLoader] : [cssLoader]
|
||||
|
||||
if (loader) {
|
||||
loaders.push({
|
||||
loader: loader + '-loader',
|
||||
options: Object.assign({}, loaderOptions, {
|
||||
sourceMap: options.sourceMap
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
if (options.extract) {
|
||||
return [MiniCssExtractPlugin.loader].concat(loaders)
|
||||
} else {
|
||||
return ['vue-style-loader'].concat(loaders)
|
||||
}
|
||||
}
|
||||
|
||||
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')
|
||||
})
|
||||
}
|
||||
}
|
||||
3
test/MES_Manage_View_V20/build/vue-loader.conf.js
Normal file
@@ -0,0 +1,3 @@
|
||||
module.exports = {
|
||||
//You can set the vue-loader configuration by yourself.
|
||||
}
|
||||
187
test/MES_Manage_View_V20/build/webpack.base.conf.js
Normal file
@@ -0,0 +1,187 @@
|
||||
'use strict'
|
||||
const path = require('path')
|
||||
const utils = require('./utils')
|
||||
const config = require('../config')
|
||||
const webpack = require('webpack')
|
||||
const { VueLoaderPlugin } = require('vue-loader')
|
||||
const vueLoaderConfig = require('./vue-loader.conf')
|
||||
const { loader} = require('mini-css-extract-plugin')
|
||||
const ESLintPlugin = require('eslint-webpack-plugin');
|
||||
|
||||
function resolve(dir) {
|
||||
return path.join(__dirname, '..', dir)
|
||||
}
|
||||
|
||||
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,
|
||||
clean: true // 替代 CleanWebpackPlugin
|
||||
},
|
||||
resolve: {
|
||||
extensions: ['.js', '.vue', '.json'],
|
||||
alias: {
|
||||
'@': resolve('src'),
|
||||
'vue$': 'vue/dist/vue.esm.js'
|
||||
},
|
||||
fallback: {
|
||||
"process": require.resolve("process/browser.js"),
|
||||
"path": require.resolve("path-browserify"),
|
||||
"crypto": require.resolve("crypto-browserify"),
|
||||
"stream": require.resolve("stream-browserify"),
|
||||
"buffer": require.resolve("buffer"),
|
||||
"util": require.resolve("util"),
|
||||
"fs": false,
|
||||
"tls": false,
|
||||
"net": false,
|
||||
"http": false,
|
||||
"https": false,
|
||||
"zlib": false
|
||||
}
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.vue$/,
|
||||
loader: 'vue-loader',
|
||||
options: vueLoaderConfig
|
||||
},
|
||||
{
|
||||
test: /\.js$/,
|
||||
loader: 'babel-loader',
|
||||
exclude: /node_modules/,
|
||||
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|webp)(\?.*)?$/,
|
||||
type: 'asset',
|
||||
parser: {
|
||||
dataUrlCondition: {
|
||||
maxSize: 10 * 1024 // 10kb
|
||||
}
|
||||
},
|
||||
generator: {
|
||||
filename: utils.assetsPath('img/[name].[hash:8][ext]')
|
||||
},
|
||||
exclude: [resolve('src/icons')]
|
||||
},
|
||||
{
|
||||
test: /\.(mp4|webm|ogg|mp3|wav|flac|aac)(\?.*)?$/,
|
||||
type: 'asset',
|
||||
parser: {
|
||||
dataUrlCondition: {
|
||||
maxSize: 10 * 1024
|
||||
}
|
||||
},
|
||||
generator: {
|
||||
filename: utils.assetsPath('media/[name].[hash:8][ext]')
|
||||
}
|
||||
},
|
||||
{
|
||||
test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
|
||||
type: 'asset',
|
||||
parser: {
|
||||
dataUrlCondition: {
|
||||
maxSize: 10 * 1024
|
||||
}
|
||||
},
|
||||
generator: {
|
||||
filename: utils.assetsPath('fonts/[name].[hash:8][ext]')
|
||||
}
|
||||
},
|
||||
// 添加 CSS 文件处理规则
|
||||
{
|
||||
test: /\.css$/,
|
||||
use: [
|
||||
process.env.NODE_ENV === 'production'
|
||||
? loader
|
||||
: 'vue-style-loader',
|
||||
'css-loader'
|
||||
],
|
||||
include: /node_modules/ // 专门处理 node_modules 中的 CSS
|
||||
},
|
||||
{
|
||||
test: /\.css$/,
|
||||
use: [
|
||||
process.env.NODE_ENV === 'production'
|
||||
? loader
|
||||
: 'vue-style-loader',
|
||||
'css-loader'
|
||||
],
|
||||
exclude: /node_modules/ // 处理项目中的 CSS
|
||||
},
|
||||
// SCSS 规则
|
||||
{
|
||||
test: /\.scss$/,
|
||||
use: [
|
||||
process.env.NODE_ENV === 'production'
|
||||
? loader
|
||||
: 'vue-style-loader',
|
||||
'css-loader',
|
||||
{
|
||||
loader: 'sass-loader',
|
||||
options: {
|
||||
// 使用现代 API
|
||||
api: 'modern',
|
||||
// 或者使用兼容模式
|
||||
// api: 'legacy',
|
||||
sassOptions: {
|
||||
// 其他 Sass 选项
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
test: /\.sass$/,
|
||||
use: [
|
||||
process.env.NODE_ENV === 'production'
|
||||
? loader
|
||||
: 'vue-style-loader',
|
||||
'css-loader',
|
||||
{
|
||||
loader: 'sass-loader',
|
||||
options: {
|
||||
sassOptions: {
|
||||
indentedSyntax: true
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
plugins: [
|
||||
new VueLoaderPlugin(),
|
||||
new webpack.ProvidePlugin({
|
||||
process: 'process/browser.js',
|
||||
Buffer: ['buffer', 'Buffer']
|
||||
}),
|
||||
// new ESLintPlugin({
|
||||
// extensions: ['js', 'vue'],
|
||||
// exclude: 'node_modules',
|
||||
// fix: false, // 可选:自动修复
|
||||
// emitWarning: false, // 显示警告
|
||||
// failOnError: false // 错误时不停止构建
|
||||
// })
|
||||
]
|
||||
}
|
||||
107
test/MES_Manage_View_V20/build/webpack.dev.conf.js
Normal file
@@ -0,0 +1,107 @@
|
||||
'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 ESLintPlugin = require('eslint-webpack-plugin')
|
||||
const portfinder = require('portfinder')
|
||||
const CopyWebpackPlugin = require('copy-webpack-plugin')
|
||||
function resolve(dir) {
|
||||
return path.join(__dirname, '..', dir)
|
||||
}
|
||||
|
||||
|
||||
const devWebpackConfig = merge(baseWebpackConfig, {
|
||||
mode: 'development',
|
||||
stats: 'errors-warnings',
|
||||
infrastructureLogging: {
|
||||
level: 'warn'
|
||||
},
|
||||
devtool: 'eval-cheap-module-source-map',
|
||||
cache: {
|
||||
type: 'filesystem',
|
||||
buildDependencies: {
|
||||
config: [__filename]
|
||||
}
|
||||
},
|
||||
devServer: {
|
||||
https: true,
|
||||
historyApiFallback: true,
|
||||
hot: true,
|
||||
compress: true,
|
||||
host: process.env.HOST || config.dev.host,
|
||||
port: process.env.PORT || config.dev.port,
|
||||
open: config.dev.autoOpenBrowser,
|
||||
static: {
|
||||
publicPath: config.dev.assetsPublicPath,
|
||||
watch: true
|
||||
},
|
||||
client: {
|
||||
logging: 'warn',
|
||||
overlay: config.dev.errorOverlay ? { errors: true, warnings: false } : false
|
||||
},
|
||||
proxy: config.dev.proxyTable
|
||||
},
|
||||
plugins: [
|
||||
new webpack.ProgressPlugin({
|
||||
activeModules: true, // 设置为 true 会显示当前正在处理的模块,但可能会影响性能
|
||||
entries: true, // 显示条目计数
|
||||
handler: (percentage, message, ...args) => {
|
||||
// 一个简单的自定义处理函数,输出到控制台
|
||||
console.log(`构建进度: ${(percentage * 100).toFixed(2)}% ${message}`);
|
||||
}
|
||||
}),
|
||||
new webpack.DefinePlugin({
|
||||
'process.env': require('../config/dev.env')
|
||||
}),
|
||||
new webpack.HotModuleReplacementPlugin(),
|
||||
new CopyWebpackPlugin({
|
||||
patterns: [
|
||||
{
|
||||
from: path.resolve(__dirname, '../static'),
|
||||
to: config.build.assetsSubDirectory,
|
||||
globOptions: {
|
||||
ignore: ['.*']
|
||||
}
|
||||
}
|
||||
]
|
||||
}),
|
||||
new HtmlWebpackPlugin({
|
||||
filename: 'index.html',
|
||||
template: 'index.html',
|
||||
inject: true,
|
||||
favicon: resolve('favicon.ico'),
|
||||
title: '数据分析处理平台',
|
||||
BASE_URL: 'static'
|
||||
}),
|
||||
...(config.dev.useEslint ? [new ESLintPlugin({
|
||||
extensions: ['js', 'vue'],
|
||||
formatter: require('eslint-friendly-formatter'),
|
||||
emitWarning: !config.dev.showEslintErrorsInOverlay
|
||||
})] : [])
|
||||
],
|
||||
optimization: {
|
||||
removeAvailableModules: false,
|
||||
removeEmptyChunks: false,
|
||||
splitChunks: false,
|
||||
minimize: false
|
||||
}
|
||||
})
|
||||
|
||||
module.exports = new Promise((resolve, reject) => {
|
||||
portfinder.basePort = process.env.PORT || config.dev.port
|
||||
portfinder.getPort((err, port) => {
|
||||
if (err) {
|
||||
reject(err)
|
||||
} else {
|
||||
devWebpackConfig.devServer.port = port
|
||||
process.env.PORT = port
|
||||
|
||||
console.log(`Your application is running here: http://${devWebpackConfig.devServer.host}:${port}`)
|
||||
resolve(devWebpackConfig)
|
||||
}
|
||||
})
|
||||
})
|
||||
133
test/MES_Manage_View_V20/build/webpack.prod.conf.js
Normal file
@@ -0,0 +1,133 @@
|
||||
'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 MiniCssExtractPlugin = require('mini-css-extract-plugin')
|
||||
const CssMinimizerPlugin = require('css-minimizer-webpack-plugin')
|
||||
const TerserPlugin = require('terser-webpack-plugin')
|
||||
const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer')
|
||||
|
||||
function resolve(dir) {
|
||||
return path.join(__dirname, '..', dir)
|
||||
}
|
||||
|
||||
const env = require('../config/prod.env')
|
||||
|
||||
const webpackConfig = merge(baseWebpackConfig, {
|
||||
mode: 'production',
|
||||
devtool: config.build.productionSourceMap ? config.build.devtool : false,
|
||||
output: {
|
||||
path: config.build.assetsRoot,
|
||||
filename: utils.assetsPath('js/[name].[contenthash:8].js'),
|
||||
chunkFilename: utils.assetsPath('js/[name].[contenthash:8].chunk.js'),
|
||||
publicPath: config.build.assetsPublicPath
|
||||
},
|
||||
plugins: [
|
||||
new webpack.DefinePlugin({
|
||||
'process.env': env
|
||||
}),
|
||||
new MiniCssExtractPlugin({
|
||||
filename: utils.assetsPath('css/[name].[contenthash:8].css'),
|
||||
chunkFilename: utils.assetsPath('css/[name].[contenthash:8].css')
|
||||
}),
|
||||
new HtmlWebpackPlugin({
|
||||
filename: config.build.index,
|
||||
template: 'index.html',
|
||||
inject: true,
|
||||
favicon: resolve('favicon.ico'),
|
||||
title: '信息管理系统',
|
||||
minify: {
|
||||
removeComments: true,
|
||||
collapseWhitespace: true,
|
||||
removeAttributeQuotes: true,
|
||||
minifyCSS: true,
|
||||
minifyJS: true
|
||||
}
|
||||
}),
|
||||
new CopyWebpackPlugin({
|
||||
patterns: [
|
||||
{
|
||||
from: path.resolve(__dirname, '../static'),
|
||||
to: config.build.assetsSubDirectory,
|
||||
globOptions: {
|
||||
ignore: ['.*']
|
||||
}
|
||||
}
|
||||
]
|
||||
})
|
||||
],
|
||||
optimization: {
|
||||
minimize: true,
|
||||
minimizer: [
|
||||
new TerserPlugin({
|
||||
parallel: true,
|
||||
terserOptions: {
|
||||
compress: {
|
||||
drop_console: true
|
||||
}
|
||||
}
|
||||
}),
|
||||
new CssMinimizerPlugin()
|
||||
],
|
||||
splitChunks: {
|
||||
chunks: 'all',
|
||||
cacheGroups: {
|
||||
libs: {
|
||||
name: 'chunk-libs',
|
||||
test: /[\\/]node_modules[\\/]/,
|
||||
priority: 10,
|
||||
chunks: 'initial'
|
||||
},
|
||||
elementUI: {
|
||||
name: 'chunk-elementUI',
|
||||
priority: 20,
|
||||
test: /[\\/]node_modules[\\/]element-ui[\\/]/
|
||||
},
|
||||
commons: {
|
||||
name: 'chunk-commons',
|
||||
test: resolve('src/components'),
|
||||
minChunks: 3,
|
||||
priority: 5,
|
||||
reuseExistingChunk: true
|
||||
}
|
||||
}
|
||||
},
|
||||
runtimeChunk: {
|
||||
name: 'runtime'
|
||||
}
|
||||
},
|
||||
performance: {
|
||||
hints: 'warning',
|
||||
maxEntrypointSize: 512000,
|
||||
maxAssetSize: 512000
|
||||
}
|
||||
})
|
||||
|
||||
if (config.build.productionGzip) {
|
||||
const CompressionWebpackPlugin = require('compression-webpack-plugin')
|
||||
webpackConfig.plugins.push(
|
||||
new CompressionWebpackPlugin({
|
||||
filename: '[path][base].gz',
|
||||
algorithm: 'gzip',
|
||||
test: new RegExp(`\\.(${config.build.productionGzipExtensions.join('|')})$`),
|
||||
threshold: 10240,
|
||||
minRatio: 0.8
|
||||
})
|
||||
)
|
||||
}
|
||||
|
||||
if (config.build.bundleAnalyzerReport) {
|
||||
webpackConfig.plugins.push(
|
||||
new BundleAnalyzerPlugin({
|
||||
analyzerPort: 8888
|
||||
})
|
||||
)
|
||||
}
|
||||
|
||||
module.exports = webpackConfig
|
||||
8
test/MES_Manage_View_V20/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"',
|
||||
})
|
||||
128
test/MES_Manage_View_V20/config/index.js
Normal file
@@ -0,0 +1,128 @@
|
||||
// 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: {
|
||||
// 代理 /api/b1s 开头的请求
|
||||
'/api/b1s': {
|
||||
target: 'https://192.168.2.90:50000', // SAP B1 Service Layer 地址
|
||||
changeOrigin: true, // 修改 Origin,让服务器认为是直接访问
|
||||
secure: false, // ⚠️ 关键:忽略 HTTPS 证书验证(自签名证书可用)
|
||||
pathRewrite: {
|
||||
'^/api/b1s': '/b1s/v1' // 重写路径:/api/b1s/Login → /b1s/v1/Login
|
||||
},
|
||||
logLevel: 'debug',
|
||||
// 可选:打印代理日志(调试用)
|
||||
onProxyReq: (proxyReq, req, res) => {
|
||||
console.log('Proxying request:', req.method, req.url);
|
||||
},
|
||||
onProxyRes: (proxyRes, req, res) => {
|
||||
// 关键:移除 WWW-Authenticate 头,阻止浏览器弹窗
|
||||
delete proxyRes.headers['www-authenticate'];
|
||||
delete proxyRes.headers['WWW-Authenticate'];
|
||||
}
|
||||
},
|
||||
'/openapi/v1':{
|
||||
target: 'http://192.168.2.90:8082', // SAP B1 Service Layer 地址
|
||||
changeOrigin: true, // 修改 Origin,让服务器认为是直接访问
|
||||
secure: false, // ⚠️ 关键:忽略 HTTPS 证书验证(自签名证书可用)
|
||||
pathRewrite: {
|
||||
'^/api/tm': '/openapi/v1' // 重写路径:/api/b1s/Login → /b1s/v1/Login
|
||||
},
|
||||
logLevel: 'debug',
|
||||
// 可选:打印代理日志(调试用)
|
||||
onProxyReq: (proxyReq, req, res) => {
|
||||
console.log('Proxying request:', req.method, req.url);
|
||||
},
|
||||
onProxyRes: (proxyRes, req, res) => {
|
||||
// 关键:移除 WWW-Authenticate 头,阻止浏览器弹窗
|
||||
delete proxyRes.headers['www-authenticate'];
|
||||
delete proxyRes.headers['WWW-Authenticate'];
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
// Various Dev Server settings
|
||||
host: ip, // can be overwritten by process.env.HOST
|
||||
port: 1998, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
|
||||
autoOpenBrowser: true,
|
||||
errorOverlay: false,
|
||||
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: false,
|
||||
// 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
test/MES_Manage_View_V20/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
test/MES_Manage_View_V20/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
test/MES_Manage_View_V20/dist.zip
Normal file
BIN
test/MES_Manage_View_V20/favicon.ico
Normal file
|
After Width: | Height: | Size: 15 KiB |
16
test/MES_Manage_View_V20/index.html
Normal file
@@ -0,0 +1,16 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
||||
<title><%= htmlWebpackPlugin.options.title %></title>
|
||||
<link rel="icon" href="favicon.ico">
|
||||
</head>
|
||||
<body style="background-color: #eeeeee">
|
||||
<script src="./static/config.js"></script>
|
||||
<script src="./static/jsQR.js"></script>
|
||||
<div id="app"></div>
|
||||
<script></script>
|
||||
<!-- built files will be auto injected -->
|
||||
</body>
|
||||
</html>
|
||||
112
test/MES_Manage_View_V20/package.json
Normal file
@@ -0,0 +1,112 @@
|
||||
{
|
||||
"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 serve --config build/webpack.dev.conf.js",
|
||||
"start": "npm run dev",
|
||||
"build": "webpack --config build/webpack.prod.conf.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@fullcalendar/core": "^6.1.17",
|
||||
"@fullcalendar/daygrid": "^6.1.17",
|
||||
"@fullcalendar/interaction": "^6.1.17",
|
||||
"@fullcalendar/vue": "^6.1.19",
|
||||
"axios": "^0.21.4",
|
||||
"buffer": "^6.0.3",
|
||||
"core-js": "^3.36.0",
|
||||
"crypto-browserify": "^3.12.1",
|
||||
"docxtemplater": "^3.42.0",
|
||||
"echarts": "^5.4.3",
|
||||
"element-ui": "^2.15.14",
|
||||
"file-saver": "^2.0.5",
|
||||
"html2canvas": "^1.4.1",
|
||||
"install": "^0.13.0",
|
||||
"jquery": "^3.7.1",
|
||||
"js-cookie": "^3.0.5",
|
||||
"jspdf": "^2.5.1",
|
||||
"jszip-utils": "^0.1.0",
|
||||
"mqtt": "^4.3.7",
|
||||
"normalize.css": "^8.0.1",
|
||||
"nprogress": "^0.2.0",
|
||||
"path-browserify": "^1.0.1",
|
||||
"process": "^0.11.10",
|
||||
"qrcode": "^1.5.3",
|
||||
"regenerator-runtime": "^0.14.1",
|
||||
"stream-browserify": "^3.0.0",
|
||||
"stylus": "^0.54.8",
|
||||
"stylus-loader": "^6.2.0",
|
||||
"time-formater": "^1.0.3",
|
||||
"util": "^0.12.5",
|
||||
"uuid": "^9.0.1",
|
||||
"vue": "^2.7.16",
|
||||
"vue-count-to": "^1.0.13",
|
||||
"vue-direction-key": "^1.0.5",
|
||||
"vue-json-viewer": "^2.2.22",
|
||||
"vue-print-nb": "^1.7.5",
|
||||
"vue-router": "^3.6.5",
|
||||
"vuex": "^3.6.2",
|
||||
"xlsx": "^0.18.5",
|
||||
"xlsx-style": "^0.8.13"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.28.4",
|
||||
"@babel/eslint-parser": "^7.28.4",
|
||||
"@babel/plugin-syntax-jsx": "7.27.1",
|
||||
"@babel/plugin-transform-runtime": "7.28.3",
|
||||
"@babel/preset-env": "^7.23.0",
|
||||
"@babel/runtime": "^7.28.4",
|
||||
"autoprefixer": "^10.4.16",
|
||||
"babel-helper-vue-jsx-merge-props": "^2.0.3",
|
||||
"babel-loader": "^9.1.3",
|
||||
"babel-plugin-syntax-jsx": "^6.18.0",
|
||||
"babel-plugin-transform-vue-jsx": "4.0.1",
|
||||
"chalk": "^4.1.2",
|
||||
"copy-webpack-plugin": "^11.0.0",
|
||||
"css-loader": "^6.8.1",
|
||||
"css-minimizer-webpack-plugin": "^5.0.1",
|
||||
"eslint": "8.57.0",
|
||||
"eslint-friendly-formatter": "^4.0.1",
|
||||
"eslint-plugin-vue": "7.20.0",
|
||||
"eslint-webpack-plugin": "^4.0.1",
|
||||
"file-loader": "^6.2.0",
|
||||
"html-webpack-plugin": "^5.5.3",
|
||||
"mini-css-extract-plugin": "^2.7.6",
|
||||
"node-notifier": "^10.0.1",
|
||||
"ora": "^5.4.1",
|
||||
"portfinder": "^1.0.32",
|
||||
"postcss": "^8.4.31",
|
||||
"postcss-import": "^12.0.1",
|
||||
"postcss-loader": "^7.3.3",
|
||||
"postcss-url": "^10.1.3",
|
||||
"raw-loader": "^4.0.2",
|
||||
"rimraf": "^3.0.2",
|
||||
"sass": "^1.69.5",
|
||||
"sass-loader": "^13.3.2",
|
||||
"script-loader": "^0.7.2",
|
||||
"semver": "^7.5.4",
|
||||
"shelljs": "^0.8.5",
|
||||
"svg-sprite-loader": "^6.0.11",
|
||||
"svgo": "^3.2.0",
|
||||
"terser-webpack-plugin": "^5.3.9",
|
||||
"url-loader": "^4.1.1",
|
||||
"vue-loader": "^15.10.1",
|
||||
"vue-style-loader": "^4.1.3",
|
||||
"vue-template-compiler": "^2.7.16",
|
||||
"webpack": "^5.89.0",
|
||||
"webpack-bundle-analyzer": "^4.10.0",
|
||||
"webpack-cli": "^5.1.4",
|
||||
"webpack-dev-server": "^4.15.1",
|
||||
"webpack-merge": "^5.10.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=20.0.0",
|
||||
"npm": ">=9.0.0"
|
||||
},
|
||||
"browserslist": [
|
||||
"> 1%",
|
||||
"last 2 versions",
|
||||
"not ie <= 11"
|
||||
]
|
||||
}
|
||||
33
test/MES_Manage_View_V20/src/App.vue
Normal file
@@ -0,0 +1,33 @@
|
||||
<template>
|
||||
<div id="app" @click="updateLastTime()">
|
||||
<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
|
||||
})
|
||||
},
|
||||
updateLastTime() {
|
||||
this.$store.commit('login/SET_LASTTIME', new Date().getTime())
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
import request from '@/utils/request'
|
||||
import state from '@/store'
|
||||
import router from '@/router'
|
||||
|
||||
// 初始化获取工艺
|
||||
export function getTechnology() {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '1',
|
||||
name: '车间生产管理工艺_基础表_工艺名称_查询数据',
|
||||
param: '工艺分类流水号_check=0'
|
||||
}
|
||||
})
|
||||
}
|
||||
// 查询表格数据
|
||||
export function searchtable(pageCurrent, pageSize, num1, ManufacturerNumber) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '1',
|
||||
name: '设备管理_设备加工能力_查询数据_设备维护',
|
||||
param: '设备名称_check=' + num1 + '&设备名称=' + ManufacturerNumber,
|
||||
Pagination: pageCurrent + '&' + pageSize
|
||||
}
|
||||
})
|
||||
}
|
||||
// 增加
|
||||
export function edittype(ManufacturerNumber, ManufacturerName, ManufacturerAbbreviation, address, phNumber, Fax, Remarks, category, attention, EquipmentCondition) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '2',
|
||||
name: '设备管理_设备加工能力_增加数据_设备维护New',
|
||||
param: '设备名称=' + ManufacturerNumber + '&设备型号=' + ManufacturerName + '&设备性能指标=' + ManufacturerAbbreviation + '&设备工时系数=' + address + '&工艺编号=' + phNumber + '&班次类型=' + Fax + '&设备加工能力工时=' + Remarks + '&整改工时系数=' + category + '&设备编号=' + attention + '&预留工时系数=' + EquipmentCondition
|
||||
}
|
||||
})
|
||||
}
|
||||
// 编辑
|
||||
export function handlechange(num, ManufacturerNumber, ManufacturerName, ManufacturerAbbreviation, address, phNumber, Fax, Remarks, category, attention, EquipmentCondition) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '2',
|
||||
name: '设备管理_设备加工能力_修改数据_设备维护New',
|
||||
param: '设备流水号=' + num + '&设备名称=' + ManufacturerNumber + '&设备型号=' + ManufacturerName + '&设备性能指标=' + ManufacturerAbbreviation + '&设备工时系数=' + address + '&工艺属性代码=' + phNumber + '&班次类型=' + Fax + '&设备加工能力工时=' + Remarks + '&整改工时系数=' + category + '&设备编号=' + attention + '&预留工时系数=' + EquipmentCondition
|
||||
}
|
||||
})
|
||||
}
|
||||
// 删除
|
||||
export function handledelete(CoManufacturerFlowNumber) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '2',
|
||||
name: '设备管理_设备加工能力_删除数据_设备维护',
|
||||
param: '设备流水号=' + CoManufacturerFlowNumber
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
import state from '@/store'
|
||||
import router from '@/router'
|
||||
|
||||
// 初始化工位
|
||||
export function getMachine() {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '1',
|
||||
name: '车间生产管理工艺_加工顺序调整_查询工位及人员'
|
||||
}
|
||||
})
|
||||
}
|
||||
// 获取状态
|
||||
export function searchState() {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '1',
|
||||
name: 'MES_机加工MES_设备状态查询_初始化'
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function getData3(num, num1, num2) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '1',
|
||||
name: '车间生产管理_设备运行情况_查询数据_状态分布图_新',
|
||||
param: '工位号=' + num + '&开始时间=' + num1 + '&结束时间=' + num2
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
import request from '@/utils/request'
|
||||
import state from '@/store'
|
||||
import router from '@/router'
|
||||
// 初始化日历
|
||||
export function initClendar(year, month) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '1',
|
||||
name: '车间生产管理工艺_基础表_工作日历_获得状态',
|
||||
param: '工作年=' + year + '&工作月=' + month
|
||||
}
|
||||
})
|
||||
}
|
||||
// 修改工作状态
|
||||
export function changeState(time, code) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '2',
|
||||
name: '车间生产管理工艺_基础表_工作日历_设置状态',
|
||||
param: '工作日期=' + time + '&工作日状态=' + code
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
import request from '@/utils/request'
|
||||
import state from '@/store'
|
||||
import router from '@/router'
|
||||
|
||||
export function featchMaterial(num1, pageCurrent, pageSize) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '1',
|
||||
name: '车间生产管理工艺_材质表_查询数据_根据材料名称',
|
||||
param: '材料名称=' + num1,
|
||||
pagination: pageCurrent + '&' + pageSize
|
||||
}
|
||||
})
|
||||
}
|
||||
export function addMaterial(num1) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '2',
|
||||
name: '车间生产管理工艺_材质表_增加数据',
|
||||
param: '材料=' + num1
|
||||
}
|
||||
})
|
||||
}
|
||||
export function delMaterial(num1) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '2',
|
||||
name: '车间生产管理工艺_材质表_删除数据',
|
||||
param: '材料流水号=' + num1
|
||||
}
|
||||
})
|
||||
}
|
||||
export function editMaterial(num1, num2) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '2',
|
||||
name: '车间生产管理工艺_材质表_修改数据',
|
||||
param: '材料流水号=' + num1 + '=int&材料=' + num2
|
||||
}
|
||||
})
|
||||
}
|
||||
105
test/MES_Manage_View_V20/src/api/BasicData/MenuManagement.js
Normal file
@@ -0,0 +1,105 @@
|
||||
import request from '@/utils/request'
|
||||
import state from '@/store'
|
||||
import router from '@/router'
|
||||
// 初始化角色
|
||||
export function getRole() {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '1',
|
||||
name: '菜单系统模块_项目角色_查询数据_MESWORK'
|
||||
}
|
||||
})
|
||||
}
|
||||
// 根据角色查模块
|
||||
export function getModule(role) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '3',
|
||||
name: `select * from [dbo].[登录基础数据_二级菜单] where 账号代码=${role} and 是否启用 = 1 order by id`
|
||||
}
|
||||
})
|
||||
}
|
||||
// 初始化一级菜单
|
||||
export function initFisrtLevel() {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '3',
|
||||
name: ` select id,title from [dbo].[登录基础数据_二级菜单] where pid = 0 and 是否启用 =1 and 账号代码 = 1`
|
||||
}
|
||||
})
|
||||
}
|
||||
// 初始化二级菜单
|
||||
export function initSecondLevel() {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '3',
|
||||
name: `select a.id,a.title,a.pid,b.id,b.title as title1 from (select id,title,pid from [dbo].[登录基础数据_二级菜单] where pid <> 0 and 账号代码 = 1 and 是否启用 = 1 )as a
|
||||
left join (select id,title from [dbo].[登录基础数据_二级菜单] where pid = 0 and 账号代码 = 1 and 是否启用 = 1 )as b on a.pid = b.id order by b.id`
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 撤回分配模块
|
||||
export function returnModule(id, num) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: `菜单管理_角色模块_删除数据`,
|
||||
param: `id=${id}&角色编号=${num}`
|
||||
}
|
||||
})
|
||||
}
|
||||
// 分配一级模块
|
||||
export function giveFirstLevel(idGroup, num) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: `菜单管理_角色模块_一级_增加数据`,
|
||||
param: `一级模块id组=${idGroup}&角色编号=${num}`
|
||||
}
|
||||
})
|
||||
}
|
||||
// 分配二级模块
|
||||
export function giveSecondLevel(idGroup, num, pid) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: `菜单管理_角色模块_二级_增加数据`,
|
||||
param: `二级模块id组=${idGroup}&角色编号=${num}&pid=${pid}`
|
||||
}
|
||||
})
|
||||
}
|
||||
// 新增一级菜单
|
||||
export function submitAdd(name) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: `菜单管理_模块_一级_增加数据`,
|
||||
param: `模块名称=${name}`
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,398 @@
|
||||
import request from '@/utils/request'
|
||||
import state from '@/store'
|
||||
import router from '@/router'
|
||||
|
||||
export function projectSelect() {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '1',
|
||||
name: 'PDM_项目名称_查询数据_按时间排序'
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function machineSelect() {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '1',
|
||||
name: 'PDM_项目名称_查询数据'
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function groupSelect(machineValue) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '1',
|
||||
name: 'PDM_零件明细表_组件流水号_查询数据_根据机床',
|
||||
param: `机床流水号=${machineValue}`
|
||||
}
|
||||
})
|
||||
}
|
||||
export function searchTable5(machineCheck, machine, groupCheck, group, part_check, part) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '1',
|
||||
name: 'PDM_零件明细表_外购件和标准件_临时表数据查询',
|
||||
param: `机床名字_check=${machineCheck}&机床名字=${machine}&组号_check=${groupCheck}&组号=${group}&物料名称_check=${part_check}&物料名称=${part}`
|
||||
}
|
||||
})
|
||||
}
|
||||
export function searchTable6(machineCheck, machine, groupCheck, group, part_check, part) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '1',
|
||||
name: 'PDM_零件明细表_基本件_临时表数据查询',
|
||||
param: `机床名字_check=${machineCheck}&机床名字=${machine}&组号_check=${groupCheck}&组号=${group}&零件图号_check=${part_check}&零件图号=${part}`
|
||||
}
|
||||
})
|
||||
}
|
||||
export function basicPartsData(machine_check, machine, group_check, group, part_check, part) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '1',
|
||||
name: 'PDM_零件明细表_基本件_查询数据_综合gj_数量维护',
|
||||
param: `机床流水号_check=${machine_check}&机床流水号=${machine}&组件流水号_check=${group_check}&组件流水号=${group}&零件图号_check=${part_check}&零件图号=${part}`
|
||||
}
|
||||
})
|
||||
}
|
||||
export function purchasePartsData(machine_check, machine, group_check, num, part_check, part) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '1',
|
||||
name: 'PDM_零件明细表_标准件和外购件_查询数据_数量维护',
|
||||
param: `机床流水号_check=${machine_check}&机床流水号=${machine}&组件流水号_check=${group_check}&组件流水号=${num}&物料名称_check=${part_check}&物料名称=${part}`
|
||||
}
|
||||
})
|
||||
}
|
||||
export function deleteBasicParts(basicNum) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '2',
|
||||
name: 'PDM_零件明细表_基本件_删除数据',
|
||||
param: `基本件流水号=${basicNum}`
|
||||
}
|
||||
})
|
||||
}
|
||||
export function alldelete(basicNum) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '2',
|
||||
name: 'PDM_零件明细表_基本件_删除数据_根据组件流水号',
|
||||
param: `基本件流水号组=${basicNum}`
|
||||
}
|
||||
})
|
||||
}
|
||||
export function deleteBasicParts5(basicNum) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '2',
|
||||
name: 'PDM_零件明细表_外购件和标准件_临时表_删除',
|
||||
param: `id=${basicNum}`
|
||||
}
|
||||
})
|
||||
}
|
||||
export function alldeleteBasicParts5(machine, group) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '2',
|
||||
name: 'PDM_零件明细表_外购件和标准件_临时表_全部删除',
|
||||
param: `机床=${machine}&组号=${group}`
|
||||
}
|
||||
})
|
||||
}
|
||||
export function deleteBasicParts6(basicNum) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '2',
|
||||
name: 'PDM_零件明细表_基本件_临时表_删除',
|
||||
param: `id=${basicNum}`
|
||||
}
|
||||
})
|
||||
}
|
||||
export function alldeleteBasicParts6(machine, group) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '2',
|
||||
name: 'PDM_零件明细表_基本件_临时表_全部删除',
|
||||
param: `机床=${machine}&组号=${group}`
|
||||
}
|
||||
})
|
||||
}
|
||||
export function deletePurchaseData(num) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '2',
|
||||
name: 'PDM_零件明细表_标准件和外购件_删除数据',
|
||||
param: '标准件和外购件流水号=' + num + '=int'
|
||||
}
|
||||
})
|
||||
}
|
||||
export function alldeleteWB(num) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '2',
|
||||
name: 'PDM_零件明细表_标准件和外购件_删除数据_根据组件流水号',
|
||||
param: '标准件和外购件流水号组=' + num
|
||||
}
|
||||
})
|
||||
}
|
||||
export function editPurchaseData(num, num1, people) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '2',
|
||||
name: 'PDM_零件明细表_标准件和外购件_修改数据',
|
||||
param: '标准件和外购件流水号=' + num + '&零件数量=' + num1 + '&修改人员=' + people
|
||||
}
|
||||
})
|
||||
}
|
||||
export function editBasicParts(num, num1, num2, num3, num4, people) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '2',
|
||||
name: 'PDM_零件明细表_基本件_编辑数据',
|
||||
param: '基本件流水号=' + num + '&零件数量=' + num1 + '&零件名称=' + num2 + '&零件图号=' + num3 + '&材料=' + num4 + '&修改人员=' + people
|
||||
}
|
||||
})
|
||||
}
|
||||
export function isExitBasicParts(num, num1) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '1',
|
||||
name: 'PDM_零件明细表_基本件_编辑数据_验证图号',
|
||||
param: '基本件流水号=' + num + '&零件图号=' + num1
|
||||
}
|
||||
})
|
||||
}
|
||||
export function getTable(num) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '1',
|
||||
name: '车间生产管理工艺_零件工艺计划_已投产_按组查',
|
||||
param: '组件流水号=' + num + '=int'
|
||||
}
|
||||
})
|
||||
}
|
||||
export function editProductNum(num, num1) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '2',
|
||||
name: 'MRP_计划订单_组件零件清单_基本件_编辑数据',
|
||||
param: '组件零件基本件流水号=' + num + '&数量=' + num1
|
||||
}
|
||||
})
|
||||
}
|
||||
export function getTable1(num, a, b, c, d, e, f, g) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '1',
|
||||
name: '车间生产管理工艺_新排产算法_能力平衡_查询数据_要平衡的零件_数量维护',
|
||||
param: '机床流水号_check=' + b + '=string&机床流水号=' + c + '=int&组件流水号_check=' + d + '=string&组件流水号=' + e + '=int&零件图号_check=' + f + '=string&零件图号=' + g + '=string&是否查询全部数据=1=string&单件是否外协=1=int&考核状态=5=int'
|
||||
}
|
||||
})
|
||||
}
|
||||
export function editProduceNum(num, num1) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '2',
|
||||
name: '车间生产管理工艺_零件工艺计划_修改数据',
|
||||
param: '工艺计划流水号=' + num + '&零件数量=' + num1
|
||||
}
|
||||
})
|
||||
}
|
||||
// 查询表1标准件和外购件
|
||||
export function searchTable1(...params) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '1',
|
||||
name: '采购管理_采购部采购_查询物料_数量维护',
|
||||
param: `机床流水号_check=${params[0]}&机床流水号=${params[1]}&组件流水号_check=${params[2]}&组件流水号=${params[3]}&物料状态=1`
|
||||
}
|
||||
})
|
||||
}
|
||||
// 查询表1基本件
|
||||
export function searchTable2(...params) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '1',
|
||||
name: '采购管理_采购部采购_查询物料_基本件_数量维护',
|
||||
param: `机床流水号_check=${params[0]}&机床流水号=${params[1]}&组件流水号_check=${params[2]}&组件流水号=${params[3]}&物料状态=1`
|
||||
}
|
||||
})
|
||||
}
|
||||
export function editGroupPartNum(num, num1) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '2',
|
||||
name: 'MRP_计划订单_组件零件清单_编辑数据',
|
||||
param: '组件零件流水号=' + num + '&零件数量=' + num1
|
||||
}
|
||||
})
|
||||
}
|
||||
export function editGroupBasicPartNum(num, num1) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '2',
|
||||
name: 'MRP_计划订单_组件零件清单_基本件_采购_编辑数据',
|
||||
param: '组件零件基本件流水号=' + num + '&零件数量=' + num1
|
||||
}
|
||||
})
|
||||
}
|
||||
export function getmaterial() {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '1',
|
||||
name: '零件明细表_材料_查询'
|
||||
}
|
||||
})
|
||||
}
|
||||
// 查询物料
|
||||
export function searchAllMaterial(check1, MaterialName, check2, MaterialSpec, check3, MaterialModel, pageCurrent, pageSize) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '1',
|
||||
name: '库存管理_物料主文件_基本_查询数据_分页',
|
||||
param: `物料名称_check=${check1}&物料名称=${MaterialName}&物料规格_check=${check2}&物料规格=${MaterialSpec}&物料型号_check=${check3}&物料型号=${MaterialModel}&PageCurrent=${pageCurrent}=int&PageSize=${pageSize}=int&PageCount=1=int=output&ItemCount=1=int=output`
|
||||
}
|
||||
})
|
||||
}
|
||||
// 物料变更
|
||||
export function materialChange(num1, num2, num3, num4, person) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '2',
|
||||
name: '采购管理_采购物料修改_零件数量维护_修改数据',
|
||||
param: `组件零件流水号=${num1}&标准件和外购件流水号=${num2}&原物料流水号=${num3}&新物料流水号=${num4}&申请人=${person}`
|
||||
}
|
||||
})
|
||||
}
|
||||
// 修改组件数量
|
||||
export function editgroupNum(num, num1) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '2',
|
||||
name: 'PDM_零件明细表_组件流水号_组件数量_修改数据',
|
||||
param: '组件流水号=' + num + '&数量=' + num1
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,430 @@
|
||||
import request from '@/utils/request'
|
||||
import state from '@/store'
|
||||
import router from '@/router'
|
||||
export function getTree() {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: 1,
|
||||
name: '人事档案管理_部门关系_查询节点',
|
||||
param: '子节点=0=int'
|
||||
}
|
||||
})
|
||||
}
|
||||
export function tree(data, pid) {
|
||||
const result = []
|
||||
let temp
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
if (data[i].父节点 === pid) {
|
||||
const obj = { label: data[i].节点名称, id: data[i].子节点 }
|
||||
temp = tree(data, data[i].子节点)
|
||||
if (temp.length > 0) {
|
||||
obj.children = temp
|
||||
}
|
||||
result.push(obj)
|
||||
}
|
||||
}
|
||||
return result
|
||||
}
|
||||
export function getTablePeople(code, pageCurrent, pageSize) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: 1,
|
||||
name: '人事档案管理_人员_部门与人员_查询数据_根据部门编号',
|
||||
param: '考核部门编号=' + code + '=int',
|
||||
pagination: pageCurrent + '&' + pageSize
|
||||
}
|
||||
})
|
||||
}
|
||||
export function getTablePeopleForName(name) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: 1,
|
||||
name: '人事档案管理_人员名单_查询数据_根据姓名_MESWORK',
|
||||
param: '姓名=' + name + '=string'
|
||||
}
|
||||
})
|
||||
}
|
||||
// 新增部门
|
||||
export function addDepartmentName(num1, num2, num3) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: 2,
|
||||
name: '人事档案管理_部门关系_增加节点',
|
||||
param: '父节点=' + num1 + '=int&节点名称=' + num2 + '=string&子节点=' + num3
|
||||
}
|
||||
})
|
||||
}
|
||||
// 删除部门
|
||||
export function delList(num1) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: 2,
|
||||
name: '人事档案管理_部门关系_删除节点',
|
||||
param: '子节点=' + num1 + '=int'
|
||||
}
|
||||
})
|
||||
}
|
||||
// 编辑部门
|
||||
export function editList(num1, num2) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: 2,
|
||||
name: '人事档案管理_部门关系_修改节点',
|
||||
param: '子节点=' + num1 + '=int&节点名称=' + num2 + '=string'
|
||||
}
|
||||
})
|
||||
}
|
||||
export function delPeopleList(num1) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: 2,
|
||||
name: '人事档案管理_人员名单_删除数据_MESWORK',
|
||||
param: '人员编号=' + num1 + '=int'
|
||||
}
|
||||
})
|
||||
}
|
||||
export function initUniversity() {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: 1,
|
||||
name: '人事档案管理_基础表_毕业院校_查询数据'
|
||||
}
|
||||
})
|
||||
}
|
||||
export function fetchEducationData() {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: 1,
|
||||
name: '人事档案管理_基础表_学历_查询数据'
|
||||
}
|
||||
})
|
||||
}
|
||||
export function initMajor() {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: 1,
|
||||
name: '人事档案管理_基础表_所学专业_查询数据'
|
||||
}
|
||||
})
|
||||
}
|
||||
export function fetchForeignLanguageLevelDate() {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: 1,
|
||||
name: '人事档案管理_基础表_外语及熟练程度_查询数据'
|
||||
}
|
||||
})
|
||||
}
|
||||
export function fetchTitleData() {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: 1,
|
||||
name: '人事档案管理_基础表_职称_查询数据'
|
||||
}
|
||||
})
|
||||
}
|
||||
export function fetchPostData() {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: 1,
|
||||
name: '人事档案管理_基础表_人员岗位_查询数据'
|
||||
}
|
||||
})
|
||||
}
|
||||
export function fetchPositionStatusData() {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: 1,
|
||||
name: '人事档案管理_基础表_岗位状态_查询数据'
|
||||
}
|
||||
})
|
||||
}
|
||||
export function addPeople(id, Sex, Education, Address, Nation, Post, AccountNumber, Password, Name, IDcard, TimeOfEntry, Birthday, ContactInformation, TeamValue) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: 2,
|
||||
name: '人事档案管理_人员名单_增加数据_MESWORK',
|
||||
param: '考核部门编号=' + id + '=int&性别编号=' + Sex + '=int&学历编号=' + Education + '=int&家庭住址=' + Address + '&民族=' + Nation + '&岗位编号=' + Post + '=int&考勤编号=' + AccountNumber + '=string&密码=' + Password + '=string&姓名=' + Name + '=string&身份证号=' + IDcard + '=string&入公司时间=' + TimeOfEntry + '=string&出生日期=' + Birthday + '=string&联系电话=' + ContactInformation + '=string&班组=' + TeamValue
|
||||
}
|
||||
})
|
||||
}
|
||||
export function editPeople(id, Sex, Education, Address, Nation, Post, AccountNumber, Password, Name, IDcard, TimeOfEntry, Birthday, ContactInformation, TeamValue) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: 2,
|
||||
name: '人事档案管理_人员名单_修改数据_MESWORK',
|
||||
param: '人员编号=' + id + '=int&性别编号=' + Sex + '=int&学历编号=' + Education + '=int&家庭住址=' + Address + '&民族=' + Nation + '&岗位编号=' + Post + '=int&考勤编号=' + AccountNumber + '=string&密码=' + Password + '=string&姓名=' + Name + '=string&身份证号=' + IDcard + '=string&入公司时间=' + TimeOfEntry + '=string&出生日期=' + Birthday + '=string&联系电话=' + ContactInformation + '=string&班组=' + TeamValue
|
||||
}
|
||||
})
|
||||
}
|
||||
export function moveGroups(num1, num2) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: 2,
|
||||
name: '人事档案管理_人员名单_移动数据_MESWORK',
|
||||
param: '人员编号=' + num1 + '=int&考核部门编号=' + num2 + '=int'
|
||||
}
|
||||
})
|
||||
}
|
||||
export function feacthUniversity(num1) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: 1,
|
||||
name: '人事档案管理_基础表_毕业院校_查询数据_根据学校名_MESWORK',
|
||||
param: '毕业院校名称=' + num1 + '=string'
|
||||
}
|
||||
})
|
||||
}
|
||||
export function addUniversity(num1) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: 2,
|
||||
name: '人事档案管理_基础表_毕业院校_增加数据',
|
||||
param: '毕业院校名称=' + num1 + '=string'
|
||||
}
|
||||
})
|
||||
}
|
||||
export function editUniversity(num1, num2) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: 2,
|
||||
name: '人事档案管理_基础表_毕业院校_修改数据',
|
||||
param: '毕业院校编号=' + num1 + '=int&毕业院校名称=' + num2 + '=string'
|
||||
}
|
||||
})
|
||||
}
|
||||
export function delUniversity(num1) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: 2,
|
||||
name: '人事档案管理_基础表_毕业院校_删除数据',
|
||||
param: '毕业院校编号=' + num1 + '=int'
|
||||
}
|
||||
})
|
||||
}
|
||||
export function fetchMajor(num1) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: 1,
|
||||
name: '人事档案管理_基础表_所学专业_查询数据_根据专业名_MESWORK',
|
||||
param: '专业名称=' + num1 + '=string'
|
||||
}
|
||||
})
|
||||
}
|
||||
export function addMajor(num1) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: 2,
|
||||
name: '人事档案管理_基础表_所学专业_增加数据',
|
||||
param: '专业名称=' + num1 + '=string'
|
||||
}
|
||||
})
|
||||
}
|
||||
export function editMajor(num1, num2) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: 2,
|
||||
name: '人事档案管理_基础表_所学专业_修改数据',
|
||||
param: '专业编号=' + num1 + '=int&专业名称=' + num2 + '=string'
|
||||
}
|
||||
})
|
||||
}
|
||||
export function delMajor(num1) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: 2,
|
||||
name: '人事档案管理_基础表_所学专业_删除数据',
|
||||
param: '专业编号=' + num1 + '=int'
|
||||
}
|
||||
})
|
||||
}
|
||||
export function fetchPost(num1) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: 1,
|
||||
name: '人事档案管理_基础表_人员岗位_查询数据_根据岗位名_MESWORK',
|
||||
param: '岗位名称=' + num1 + '=string'
|
||||
}
|
||||
})
|
||||
}
|
||||
export function addPost(num1) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: 2,
|
||||
name: '人事档案管理_基础表_人员岗位_增加数据',
|
||||
param: '岗位名称=' + num1 + '=string'
|
||||
}
|
||||
})
|
||||
}
|
||||
export function editPost(num1, num2) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: 2,
|
||||
name: '人事档案管理_基础表_人员岗位_修改数据',
|
||||
param: '岗位编号=' + num1 + '=int&岗位名称=' + num2 + '=string'
|
||||
}
|
||||
})
|
||||
}
|
||||
export function delPost(num1) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: 2,
|
||||
name: '人事档案管理_基础表_人员岗位_删除数据',
|
||||
param: '岗位编号=' + num1 + '=int'
|
||||
}
|
||||
})
|
||||
}
|
||||
export function quit(num1) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: 2,
|
||||
name: '人事档案管理_人员_离职操作',
|
||||
param: '人员编号=' + num1 + '=int'
|
||||
}
|
||||
})
|
||||
}
|
||||
export function searchLeavingList(pageCurrent, pageSize) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: 1,
|
||||
name: '人事档案管理_人员_离职人员查询',
|
||||
pagination: pageCurrent + '&' + pageSize
|
||||
}
|
||||
})
|
||||
}
|
||||
export function fetchteamviwer() {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: 1,
|
||||
name: '班组管理_班组查询'
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
import request from '@/utils/request'
|
||||
import state from '@/store'
|
||||
import router from '@/router'
|
||||
|
||||
// 项目
|
||||
export function getProject() {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '1',
|
||||
name: 'PDM_项目名称_查询数据_是否显示_初始化',
|
||||
param: '项目流水号_check=0=int&项目流水号=0'
|
||||
}
|
||||
})
|
||||
}
|
||||
// 机床
|
||||
export function getToolNum(check, num) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '1',
|
||||
name: 'PDM_项目名称_查询数据_是否显示_初始化',
|
||||
param: '项目流水号_check=' + check + '=int&项目流水号=' + num
|
||||
}
|
||||
})
|
||||
}
|
||||
export function searchTable(check, num, check1, num1) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '1',
|
||||
name: 'PDM_项目名称_查询数据_是否显示',
|
||||
param: '项目流水号_check=' + check + '=int&项目流水号=' + num + '&机床流水号_check=' + check1 + '=int&机床流水号=' + num1
|
||||
}
|
||||
})
|
||||
}
|
||||
export function upData(num, show) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '2',
|
||||
name: 'PDM_项目名称_查询数据_是否显示_更改状态',
|
||||
param: '机床流水号=' + num + '&是否显示=' + show
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,88 @@
|
||||
import request from '@/utils/request'
|
||||
import state from '@/store'
|
||||
import router from '@/router'
|
||||
|
||||
// 查询班次
|
||||
export function getScheduling(SchedulingType) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '1',
|
||||
name: '设备管理_基础表_班次表_查询数据',
|
||||
param: '班次类型=' + SchedulingType
|
||||
}
|
||||
})
|
||||
}
|
||||
// 查询班次
|
||||
export function searchProgramme() {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '1',
|
||||
name: '设备管理_基础表_班次表_查询班次'
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 新增班次
|
||||
export function addShift(starttime, endtime, shifttype, shiftnumber, nightwork, work, temporary, difficult, note) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '2',
|
||||
name: '设备管理_基础表_班次表_增加数据',
|
||||
param: '开始工作时间=' + starttime + '&结束工作时间=' + endtime + '&班次类型=' + shifttype + '&班次代码=' + shiftnumber + '&是否夜班=' + nightwork + '&是否工作=' + work + '=int&是否可以安排临时件=' + temporary + '=int&是否可以安排高难度件=' + difficult + '=int&备注=' + note
|
||||
}
|
||||
})
|
||||
}
|
||||
// 编辑班次
|
||||
export function editShift(shiftCode, starttime, endtime, shifttype, shiftnumber, nightwork, work, temporary, difficult, note) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '2',
|
||||
name: '设备管理_基础表_班次表_修改数据',
|
||||
param: '序号=' + shiftCode + '=int&开始工作时间=' + starttime + '=datetime&结束工作时间=' + endtime + '=datetime&班次类型=' + shifttype + '=int&班次代码=' + shiftnumber + '=int&是否夜班=' + nightwork + '=int&是否工作=' + work + '=int&是否可以安排临时件=' + temporary + '=int&是否可以安排高难度件=' + difficult + '=int&备注=' + note
|
||||
}
|
||||
})
|
||||
}
|
||||
// 删除班次
|
||||
export function deleteShift(shiftCode) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '2',
|
||||
name: '设备管理_基础表_班次表_删除数据',
|
||||
param: '序号=' + shiftCode
|
||||
}
|
||||
})
|
||||
}
|
||||
// 班次类型与工作时间增加
|
||||
export function addShiftType() {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '2',
|
||||
name: '设备管理_基础表_班次表_班次类型与工作时间_增加'
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
import request from '@/utils/request'
|
||||
import state from '@/store'
|
||||
import router from '@/router'
|
||||
export function InitRolefunction() {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '1',
|
||||
name: '菜单系统模块_项目角色_查询数据_MESWORK'
|
||||
}
|
||||
})
|
||||
}
|
||||
export function deleteData(code) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: 1,
|
||||
name: '菜单系统模块_项目角色_删除_MESWORK',
|
||||
param: '角色编号=' + code + '=int'
|
||||
}
|
||||
})
|
||||
}
|
||||
export function searchTable(num) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '1',
|
||||
name: '菜单系统模块_项目角色_查询数据_MESWORK',
|
||||
param: '角色功能=' + num + '=string'
|
||||
}
|
||||
})
|
||||
}
|
||||
export function addData(code) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: 2,
|
||||
name: '菜单系统模块_项目角色_增加_MESWORK',
|
||||
param: '角色功能=' + code + '=string'
|
||||
}
|
||||
})
|
||||
}
|
||||
export function addData2(code1, num1) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: 2,
|
||||
name: '菜单系统模块_项目角色_修改数据_MESWORK',
|
||||
param: '角色功能=' + code1 + '&角色编号=' + num1
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -0,0 +1,97 @@
|
||||
import request from '@/utils/request'
|
||||
import state from '@/store'
|
||||
import router from '@/router'
|
||||
export function getRole() {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '1',
|
||||
name: '菜单模块系统_项目角色_查询数据'
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function getModule(role_check, role) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '1',
|
||||
name: '菜单模块系统_项目主模块列表_查询数据',
|
||||
param: `角色编号_check=${role_check}&角色编号=${role}=int`
|
||||
}
|
||||
})
|
||||
}
|
||||
export function addModule(module, role) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '2',
|
||||
name: '菜单模块系统_项目角色模块列表_增加数据',
|
||||
param: `角色编号=${role}=int&主模块编号=${module}=int`
|
||||
}
|
||||
})
|
||||
}
|
||||
export function deleteModule(module, role) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '2',
|
||||
name: '菜单模块系统_项目角色模块列表_删除数据',
|
||||
param: `角色编号=${role}=int&主模块编号=${module}=int`
|
||||
}
|
||||
})
|
||||
}
|
||||
// 周一从这里开始改!!!
|
||||
export function getModelData(role) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '1',
|
||||
name: '菜单模块系统_项目主模块列表_查询单个模块',
|
||||
param: `主模块编号=${role}=int`
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function addModelData(component, title, icons) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '2',
|
||||
name: '菜单模块系统_项目主模块列表_增加单个模块',
|
||||
param: `父路径=/${icons}&子名称=${icons}&子组件=${component}&标题=${title}&图标=${icons}`
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function editModelData(modelNum, component, title, icons) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '2',
|
||||
name: '菜单模块系统_项目主模块列表_修改单个模块',
|
||||
param: `主模块编号=${modelNum}&父路径=/${icons}&子名称=${icons}&子组件=${component}&标题=${title}&图标=${icons}`
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,176 @@
|
||||
import request from '@/utils/request'
|
||||
import state from '@/store'
|
||||
import router from '@/router'
|
||||
|
||||
// 查询项目名称
|
||||
export function dialogtablevisible() {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '1',
|
||||
name: '人事档案管理_部门关系_查询节点',
|
||||
param: '子节点=0'
|
||||
}
|
||||
})
|
||||
}
|
||||
export function dialogtablevisible1() {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '1',
|
||||
name: '人事档案管理_部门关系_查询节点',
|
||||
param: '子节点=0'
|
||||
}
|
||||
})
|
||||
}
|
||||
export function addData1(code, groupNum) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: 2,
|
||||
name: '菜单系统模块_项目角色员工综合_增加数据',
|
||||
param: '人员编号=' + code + '=int&角色编号=' + groupNum + '=int&项目编号=10=int'
|
||||
}
|
||||
})
|
||||
}
|
||||
export function addData2(lsh, code, groupNum) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: 2,
|
||||
name: '菜单系统模块_项目角色员工综合_修改数据',
|
||||
param: '人员角色流水号=' + lsh + '&人员编号=' + code + '&角色编号=' + groupNum
|
||||
}
|
||||
})
|
||||
}
|
||||
// 初始化科室
|
||||
export function initDepartment() {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '1',
|
||||
name: '人事档案管理_部门关系_查询节点'
|
||||
}
|
||||
})
|
||||
}
|
||||
// 初始化人员信息 弹出框
|
||||
export function getTree() {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: 1,
|
||||
name: '人事档案管理_部门关系_查询节点',
|
||||
param: '子节点=0=int'
|
||||
}
|
||||
})
|
||||
}
|
||||
export function fn(data, pid) {
|
||||
const result = []
|
||||
let temp
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
if (data[i].父节点 === pid) {
|
||||
const obj = { label: data[i].节点名称, id: data[i].子节点 }
|
||||
temp = fn(data, data[i].子节点)
|
||||
if (temp.length > 0) {
|
||||
obj.children = temp
|
||||
}
|
||||
result.push(obj)
|
||||
}
|
||||
}
|
||||
return result
|
||||
}
|
||||
export function getTable8(code) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: 1,
|
||||
name: '人事档案管理_人员_部门与人员_查询数据_根据部门编号',
|
||||
param: '考核部门编号=' + code + '=int'
|
||||
}
|
||||
})
|
||||
}
|
||||
export function handledelete(ryjslsh) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: 2,
|
||||
name: '菜单系统模块_项目角色员工综合_删除数据',
|
||||
param: '人员角色流水号=' + ryjslsh + '=string'
|
||||
}
|
||||
})
|
||||
}
|
||||
export function deleteData(Number) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '2',
|
||||
name: '菜单系统模块_项目角色员工综合_删除数据',
|
||||
param: '人员角色流水号=' + Number + '=int'
|
||||
}
|
||||
})
|
||||
}
|
||||
export function searchdesigner(num2) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '1',
|
||||
name: '人事档案管理_人员_部门与人员_查询数据_根据部门编号',
|
||||
param: '考核部门编号=' + num2 + '=int'
|
||||
}
|
||||
})
|
||||
}
|
||||
export function initOrderType() {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '1',
|
||||
name: '菜单系统模块_项目角色_查询数据_new'
|
||||
}
|
||||
})
|
||||
}
|
||||
export function searchTable(check1, staffName, check2, systemAdministrator) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '1',
|
||||
name: '菜单系统模块_项目角色员工综合_查询数据',
|
||||
param: '姓名_check=' + check1 + '=int&姓名=' + staffName + '=string&角色编号_check=' + check2 + ' =int&角色编号=' + systemAdministrator + '=int'
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,184 @@
|
||||
import request from '@/utils/request'
|
||||
import state from '@/store'
|
||||
import router from '@/router'
|
||||
// 查工艺分类名称
|
||||
export function searchProcessClassification() {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '1',
|
||||
name: '车间生产管理工艺_基础表_工艺分类名称_查询数据'
|
||||
}
|
||||
})
|
||||
}
|
||||
// 增加工艺分类
|
||||
export function addProcessClassification(ProcessClassification) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '2',
|
||||
name: '车间生产管理工艺_基础表_工艺分类名称_增加数据',
|
||||
param: '工艺分类名称=' + ProcessClassification
|
||||
}
|
||||
})
|
||||
}
|
||||
// 编辑工艺分类
|
||||
export function editProcessClassification(ProcessClassificationNum, ProcessClassification) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '2',
|
||||
name: '车间生产管理工艺_基础表_工艺分类名称_修改数据',
|
||||
param: '工艺分类流水号=' + ProcessClassificationNum + '&工艺分类名称=' + ProcessClassification
|
||||
}
|
||||
})
|
||||
}
|
||||
// 通过工艺编分类流水号查工艺分类名称
|
||||
export function searchProcessClassificationOfProcessClassificationNum(ProcessNum) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '1',
|
||||
name: '车间生产管理工艺_基础表_工艺分类名称_根据流水号_查询数据_MESWORK',
|
||||
param: '工艺分类流水号=' + ProcessNum
|
||||
}
|
||||
})
|
||||
}
|
||||
// 删除工艺分类
|
||||
export function delProcessClassification(ProcessClassificationNum) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '2',
|
||||
name: '车间生产管理工艺_基础表_工艺分类名称_删除数据',
|
||||
param: '工艺分类流水号=' + ProcessClassificationNum
|
||||
}
|
||||
})
|
||||
}
|
||||
// 通过工艺分类流水号查工艺名称
|
||||
export function searchProcessNameOfProcessClassification(ProcessClassificationNum) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '1',
|
||||
name: '车间生产管理工艺_基础表_工艺名称_查询数据_按工艺分类流水号查_MESWORK',
|
||||
param: '工艺分类流水号=' + ProcessClassificationNum
|
||||
}
|
||||
})
|
||||
}
|
||||
// 通过工艺编号查工艺要求
|
||||
export function searchTechnologicalRequirementsOfProcessNum(ProcessNum) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '1',
|
||||
name: '车间生产管理_基础表_工艺要求_查询数据',
|
||||
param: '工艺编号=' + ProcessNum
|
||||
}
|
||||
})
|
||||
}
|
||||
// 增加工艺
|
||||
export function addProcess(ProcessClassificationNum, ProcessName, ShortName) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '2',
|
||||
name: 'dbo.车间生产管理工艺_基础表_工艺名称_增加数据',
|
||||
param: '工艺分类流水号=' + ProcessClassificationNum + '&工艺名称=' + ProcessName + '&工艺名称简称=' + ShortName
|
||||
}
|
||||
})
|
||||
}
|
||||
// 编辑工艺
|
||||
export function editProcess(ProcessClassificationNum, ProcessName, ShortName, Requirement) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '2',
|
||||
name: '车间生产管理工艺_基础表_工艺名称_修改名称及简称',
|
||||
param: '工艺编号=' + ProcessClassificationNum + '&工艺名称=' + ProcessName + '&工艺名称简称=' + ShortName + '&工艺要求=' + Requirement
|
||||
}
|
||||
})
|
||||
}
|
||||
// 删除工艺
|
||||
export function delProcess(ProcessNum) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '2',
|
||||
name: '车间生产管理工艺_基础表_工艺名称_删除数据',
|
||||
param: '工艺编号=' + ProcessNum
|
||||
}
|
||||
})
|
||||
}
|
||||
// 新增工艺要求
|
||||
export function addTechnologicalRequirements(ProcessClassificationNum, ProcessName) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '2',
|
||||
name: '车间生产管理_基础表_工艺要求_增加数据',
|
||||
param: '工艺编号=' + ProcessClassificationNum + '&工艺要求=' + ProcessName
|
||||
}
|
||||
})
|
||||
}
|
||||
// 编辑工艺要求
|
||||
export function editTechnologicalRequirements(ProcessClassificationNum, ProcessName) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '2',
|
||||
name: '车间生产管理_基础表_工艺要求_修改数据',
|
||||
param: '工艺要求流水号=' + ProcessClassificationNum + '&工艺要求=' + ProcessName
|
||||
}
|
||||
})
|
||||
}
|
||||
// 删除工艺要求
|
||||
export function delTechnologicalRequirements(ProcessClassificationNum) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '2',
|
||||
name: '车间生产管理_基础表_工艺要求_删除数据',
|
||||
param: '工艺要求流水号=' + ProcessClassificationNum
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,115 @@
|
||||
import request from '@/utils/request'
|
||||
import state from '@/store'
|
||||
import router from '@/router'
|
||||
|
||||
// 初始化设备名称
|
||||
export function getEquipment(id, equipmentNum) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '1',
|
||||
name: '设备管理_设备名称与班次关系_查询数据',
|
||||
param: `查询代码=${id}=int&设备流水号=${equipmentNum}`
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function getDepartment() {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '1',
|
||||
name: '设备管理_部门查询'
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function getTablePeople(number) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '1',
|
||||
name: '人事档案管理_人员_部门与人员_查询数据_根据部门编号',
|
||||
param: `考核部门编号=${number}`
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function getTableData(equipmentCheck, equipmentNameValue, operatorCheck, operatorNumber, pageCurrent, pageSize) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '1',
|
||||
name: '设备管理_设备名称_人员关系_查询数据',
|
||||
param: `设备流水号_check=${equipmentCheck}&设备流水号=${equipmentNameValue}&操作者编号_check=${operatorCheck}&操作者编号=${operatorNumber}`,
|
||||
pagination: pageCurrent + '&' + pageSize
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function deleteTable(number) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '2',
|
||||
name: '设备管理_设备名称_人员关系_删除数据',
|
||||
param: '设备人员关系流水号=' + number + '=int'
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function getStaff() {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '1',
|
||||
name: '设备管理_基础表_班次表_查询班次'
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function addTable(equipmentNumber, shift, operator, operatorNumber) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '2',
|
||||
name: '设备管理_设备名称_人员关系_增加数据',
|
||||
param: '设备流水号=' + equipmentNumber + '=int&班次代码=' + shift + '=int&操作者=' + operator + '=string&操作者编号=' + operatorNumber + '=int'
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function editTable(equipmentNumber, shift, operator, operatorNumber, Number) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '2',
|
||||
name: '设备管理_设备名称_人员关系_修改数据',
|
||||
param: '设备流水号=' + equipmentNumber + '=int&班次代码=' + shift + '=int&操作者=' + operator + '=string&操作者编号=' + operatorNumber + '=int&设备人员关系流水号=' + Number + '=int'
|
||||
}
|
||||
})
|
||||
}
|
||||
5
test/MES_Manage_View_V20/src/api/FactoryCalendar.js
Normal file
@@ -0,0 +1,5 @@
|
||||
import axios from 'axios'
|
||||
|
||||
export function getLine() {
|
||||
return axios.post(window.dt_Config.ip + '/submit/QualityData_NormalDistribution.ashx?type=GetBaseTrendData')
|
||||
}
|
||||
@@ -0,0 +1,198 @@
|
||||
import request from '@/utils/request'
|
||||
import state from '@/store'
|
||||
import router from '@/router'
|
||||
|
||||
// 获取工位 表1
|
||||
export function getTableData1() {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '3',
|
||||
name: `
|
||||
SELECT 基础数据_点检类型名称.*,[基础数据_设备工位点检表].*,[MES_计划BOM_工位与名称].工位名称 FROM [基础数据_设备工位点检表]
|
||||
inner join dbo.基础数据_点检类型名称
|
||||
on [基础数据_设备工位点检表].点检表类型 = 基础数据_点检类型名称.点检表类型流水号
|
||||
inner join [MES_计划BOM_工位与名称]
|
||||
on [MES_计划BOM_工位与名称].工位号 = [基础数据_设备工位点检表].工位号
|
||||
`
|
||||
}
|
||||
})
|
||||
}
|
||||
// 点检类型 表2
|
||||
export function getTableData2() {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '3',
|
||||
name: 'select * from 基础数据_点检类型名称'
|
||||
}
|
||||
})
|
||||
}
|
||||
// 点检内容 表3
|
||||
export function getTableData3(num) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '3',
|
||||
name: `select * from 基础数据_点检内容 where 点检表类型 = ${num}`
|
||||
}
|
||||
})
|
||||
}
|
||||
// 表1 编辑
|
||||
export function editType(num1, num2) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '4',
|
||||
name: `update [基础数据_设备工位点检表] set 点检表类型 = ${num1} where ID = ${num2}`
|
||||
}
|
||||
})
|
||||
}
|
||||
export function confirmEdit1(num1, num2) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '4',
|
||||
name: `update [基础数据_点检类型名称] set 点检表类型名称 = '${num1}' where 点检表类型流水号 = ${num2}`
|
||||
}
|
||||
})
|
||||
}
|
||||
export function confirmEdit2(num1, num2, num3) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '4',
|
||||
name: `update 基础数据_点检内容 set 保养周期 = ${num1} ,保养项目 = '${num2}' where ID = ${num3}`
|
||||
}
|
||||
})
|
||||
}
|
||||
export function openDelete1(num1) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '4',
|
||||
name: `delete 基础数据_点检类型名称 where 点检表类型流水号 = ${num1}`
|
||||
}
|
||||
})
|
||||
}
|
||||
export function selectCount(num1) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '3',
|
||||
name: `SELECT 工位号 FROM [基础数据_设备工位点检表] where 点检表类型 = ${num1}`
|
||||
}
|
||||
})
|
||||
}
|
||||
export function openDelete2(num1) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '4',
|
||||
name: `delete 基础数据_点检内容 where ID = ${num1}`
|
||||
}
|
||||
})
|
||||
}
|
||||
export function submit1(num1) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '4',
|
||||
name: `insert into 基础数据_点检类型名称 (点检表类型名称) values ('${num1}')`
|
||||
}
|
||||
})
|
||||
}
|
||||
export function submit2(num1, num2, num3) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '4',
|
||||
name: ` declare @id int = 0
|
||||
SELECT top 1 @id = ID FROM [dbo].基础数据_点检内容 order by ID desc
|
||||
set @id = @id + 1
|
||||
insert into 基础数据_点检内容 (点检任务编号,点检表类型,保养项目,保养周期) values (@id,${num1},'${num2}',${num3})`
|
||||
}
|
||||
})
|
||||
}
|
||||
export function exportOut(num1, num2, num3) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '3',
|
||||
name: `SELECT *
|
||||
,case when [FN1] in (select 人员编号 from 人事档案管理_人员名单) then (select 姓名 from 人事档案管理_人员名单 where 人员编号 = [FN1]) else '' end as [姓名1]
|
||||
,case when [FN2] in (select 人员编号 from 人事档案管理_人员名单) then (select 姓名 from 人事档案管理_人员名单 where 人员编号 = [FN2]) else '' end as [姓名2]
|
||||
,case when [FN3] in (select 人员编号 from 人事档案管理_人员名单) then (select 姓名 from 人事档案管理_人员名单 where 人员编号 = [FN3]) else '' end as [姓名3]
|
||||
,case when [FN4] in (select 人员编号 from 人事档案管理_人员名单) then (select 姓名 from 人事档案管理_人员名单 where 人员编号 = [FN4]) else '' end as [姓名4]
|
||||
,case when [FN5] in (select 人员编号 from 人事档案管理_人员名单) then (select 姓名 from 人事档案管理_人员名单 where 人员编号 = [FN5]) else '' end as [姓名5]
|
||||
,case when [FN6] in (select 人员编号 from 人事档案管理_人员名单) then (select 姓名 from 人事档案管理_人员名单 where 人员编号 = [FN6]) else '' end as [姓名6]
|
||||
,case when [FN7] in (select 人员编号 from 人事档案管理_人员名单) then (select 姓名 from 人事档案管理_人员名单 where 人员编号 = [FN7]) else '' end as [姓名7]
|
||||
,case when [FN8] in (select 人员编号 from 人事档案管理_人员名单) then (select 姓名 from 人事档案管理_人员名单 where 人员编号 = [FN8]) else '' end as [姓名8]
|
||||
,case when [FN9] in (select 人员编号 from 人事档案管理_人员名单) then (select 姓名 from 人事档案管理_人员名单 where 人员编号 = [FN9]) else '' end as [姓名9]
|
||||
,case when [FN10] in (select 人员编号 from 人事档案管理_人员名单) then (select 姓名 from 人事档案管理_人员名单 where 人员编号 = [FN10]) else '' end as [姓名10]
|
||||
,case when [FN11] in (select 人员编号 from 人事档案管理_人员名单) then (select 姓名 from 人事档案管理_人员名单 where 人员编号 = [FN11]) else '' end as [姓名11]
|
||||
,case when [FN12] in (select 人员编号 from 人事档案管理_人员名单) then (select 姓名 from 人事档案管理_人员名单 where 人员编号 = [FN12]) else '' end as [姓名12]
|
||||
,case when [FN13] in (select 人员编号 from 人事档案管理_人员名单) then (select 姓名 from 人事档案管理_人员名单 where 人员编号 = [FN13]) else '' end as [姓名13]
|
||||
,case when [FN14] in (select 人员编号 from 人事档案管理_人员名单) then (select 姓名 from 人事档案管理_人员名单 where 人员编号 = [FN14]) else '' end as [姓名14]
|
||||
,case when [FN15] in (select 人员编号 from 人事档案管理_人员名单) then (select 姓名 from 人事档案管理_人员名单 where 人员编号 = [FN15]) else '' end as [姓名15]
|
||||
,case when [FN16] in (select 人员编号 from 人事档案管理_人员名单) then (select 姓名 from 人事档案管理_人员名单 where 人员编号 = [FN16]) else '' end as [姓名16]
|
||||
,case when [FN17] in (select 人员编号 from 人事档案管理_人员名单) then (select 姓名 from 人事档案管理_人员名单 where 人员编号 = [FN17]) else '' end as [姓名17]
|
||||
,case when [FN18] in (select 人员编号 from 人事档案管理_人员名单) then (select 姓名 from 人事档案管理_人员名单 where 人员编号 = [FN18]) else '' end as [姓名18]
|
||||
,case when [FN19] in (select 人员编号 from 人事档案管理_人员名单) then (select 姓名 from 人事档案管理_人员名单 where 人员编号 = [FN19]) else '' end as [姓名19]
|
||||
,case when [FN20] in (select 人员编号 from 人事档案管理_人员名单) then (select 姓名 from 人事档案管理_人员名单 where 人员编号 = [FN20]) else '' end as [姓名20]
|
||||
,case when [FN21] in (select 人员编号 from 人事档案管理_人员名单) then (select 姓名 from 人事档案管理_人员名单 where 人员编号 = [FN21]) else '' end as [姓名21]
|
||||
,case when [FN22] in (select 人员编号 from 人事档案管理_人员名单) then (select 姓名 from 人事档案管理_人员名单 where 人员编号 = [FN22]) else '' end as [姓名22]
|
||||
,case when [FN23] in (select 人员编号 from 人事档案管理_人员名单) then (select 姓名 from 人事档案管理_人员名单 where 人员编号 = [FN23]) else '' end as [姓名23]
|
||||
,case when [FN24] in (select 人员编号 from 人事档案管理_人员名单) then (select 姓名 from 人事档案管理_人员名单 where 人员编号 = [FN24]) else '' end as [姓名24]
|
||||
,case when [FN25] in (select 人员编号 from 人事档案管理_人员名单) then (select 姓名 from 人事档案管理_人员名单 where 人员编号 = [FN25]) else '' end as [姓名25]
|
||||
,case when [FN26] in (select 人员编号 from 人事档案管理_人员名单) then (select 姓名 from 人事档案管理_人员名单 where 人员编号 = [FN26]) else '' end as [姓名26]
|
||||
,case when [FN27] in (select 人员编号 from 人事档案管理_人员名单) then (select 姓名 from 人事档案管理_人员名单 where 人员编号 = [FN27]) else '' end as [姓名27]
|
||||
,case when [FN28] in (select 人员编号 from 人事档案管理_人员名单) then (select 姓名 from 人事档案管理_人员名单 where 人员编号 = [FN28]) else '' end as [姓名28]
|
||||
,case when [FN29] in (select 人员编号 from 人事档案管理_人员名单) then (select 姓名 from 人事档案管理_人员名单 where 人员编号 = [FN29]) else '' end as [姓名29]
|
||||
,case when [FN30] in (select 人员编号 from 人事档案管理_人员名单) then (select 姓名 from 人事档案管理_人员名单 where 人员编号 = [FN30]) else '' end as [姓名30]
|
||||
,case when [FN31] in (select 人员编号 from 人事档案管理_人员名单) then (select 姓名 from 人事档案管理_人员名单 where 人员编号 = [FN31]) else '' end as [姓名31]
|
||||
FROM
|
||||
[基础数据_设备工位点检表] inner join [工位日点检任务记录]
|
||||
on [基础数据_设备工位点检表].工位号 = [工位日点检任务记录].工位号
|
||||
inner join [基础数据_点检内容]
|
||||
on [工位日点检任务记录].点检任务编号 = [基础数据_点检内容].点检任务编号
|
||||
where [基础数据_设备工位点检表].工位号 = '${num1}' and 年 = '${num2}' and 月 = '${num3}' order by [工位日点检任务记录].点检任务编号`
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
import { ip } from '@/api/ipAddress'
|
||||
import axios from 'axios'
|
||||
|
||||
// 排列表图
|
||||
export function GetChart(OPNameCheck, opName, shaftNameCheck, shaftName, itemNameCheck, itemName, EngineTypeIDCheck, EngineTypeID, startTime, endTime, yangben, num) {
|
||||
return axios.post(ip + '/submit/QualityData_XR.ashx?type=GetChart&OPNameCheck=' + OPNameCheck + '&OPName=' + opName + '&shaftNameCheck=' + shaftNameCheck + '&shaftName=' + shaftName + '&itemNameCheck=' + itemNameCheck + '&itemName=' + itemName + '&EngineTypeIDCheck=' + EngineTypeIDCheck + '&EngineTypeID=' + EngineTypeID + '&startTime=' + startTime + '&endTime=' + endTime + '&Yangben=' + yangben + '&Num=' + num)
|
||||
}
|
||||
// 均值图&极差图&正态分布图
|
||||
export function GetBaseTrendData(OPNameCheck, opName, shaftNameCheck, shaftName, itemNameCheck, itemName, EngineTypeIDCheck, EngineTypeID, startTime, endTime, yangben, num) {
|
||||
return axios.post(ip + '/submit/QualityData_XR.ashx?type=GetBaseTrendData&OPNameCheck=' + OPNameCheck + '&OPName=' + opName + '&shaftNameCheck=' + shaftNameCheck + '&shaftName=' + shaftName + '&itemNameCheck=' + itemNameCheck + '&itemName=' + itemName + '&EngineTypeIDCheck=' + EngineTypeIDCheck + '&EngineTypeID=' + EngineTypeID + '&startTime=' + startTime + '&endTime=' + endTime + '&Yangben=' + yangben + '&Num=' + num)
|
||||
}
|
||||
// 分析线及Y轴/X轴
|
||||
export function GetMarkLineByConditent(OPNameCheck, opName, shaftNameCheck, shaftName, itemNameCheck, itemName, EngineTypeIDCheck, EngineTypeID, startTime, endTime, yangben, num) {
|
||||
return axios.post(ip + '/submit/QualityData_XR.ashx?type=GetMarkLineByConditent&OPNameCheck=' + OPNameCheck + '&OPName=' + opName + '&shaftNameCheck=' + shaftNameCheck + '&shaftName=' + shaftName + '&itemNameCheck=' + itemNameCheck + '&itemName=' + itemName + '&EngineTypeIDCheck=' + EngineTypeIDCheck + '&EngineTypeID=' + EngineTypeID + '&startTime=' + startTime + '&endTime=' + endTime + '&Yangben=' + yangben + '&Num=' + num)
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
import { ip } from '@/api/ipAddress'
|
||||
import axios from 'axios'
|
||||
|
||||
// 均值图&极差图&正态分布图
|
||||
export function GetBaseTrendData(OPNameCheck, opName, shaftNameCheck, shaftName, itemNameCheck, itemName, EngineTypeIDCheck, EngineTypeID, startTime, endTime, yangben, num) {
|
||||
return axios.post(ip + '/submit/QualityData_XS.ashx?type=GetBaseTrendData&OPNameCheck=' + OPNameCheck + '&OPName=' + opName + '&shaftNameCheck=' + shaftNameCheck + '&shaftName=' + shaftName + '&itemNameCheck=' + itemNameCheck + '&itemName=' + itemName + '&EngineTypeIDCheck=' + EngineTypeIDCheck + '&EngineTypeID=' + EngineTypeID + '&startTime=' + startTime + '&endTime=' + endTime + '&Yangben=' + yangben + '&Num=' + num)
|
||||
}
|
||||
// 分析线及Y轴/X轴
|
||||
export function GetMarkLineByConditent(OPNameCheck, opName, shaftNameCheck, shaftName, itemNameCheck, itemName, EngineTypeIDCheck, EngineTypeID, startTime, endTime, yangben, num) {
|
||||
return axios.post(ip + '/submit/QualityData_XS.ashx?type=GetMarkLineByConditent&OPNameCheck=' + OPNameCheck + '&OPName=' + opName + '&shaftNameCheck=' + shaftNameCheck + '&shaftName=' + shaftName + '&itemNameCheck=' + itemNameCheck + '&itemName=' + itemName + '&EngineTypeIDCheck=' + EngineTypeIDCheck + '&EngineTypeID=' + EngineTypeID + '&startTime=' + startTime + '&endTime=' + endTime + '&Yangben=' + yangben + '&Num=' + num)
|
||||
}
|
||||
11
test/MES_Manage_View_V20/src/api/SPCanalysis/arrangeChart.js
Normal file
@@ -0,0 +1,11 @@
|
||||
import { ip } from '@/api/ipAddress'
|
||||
import axios from 'axios'
|
||||
|
||||
// 获取表格数据--质量数据查询_综合查询_数据分组_大柴
|
||||
export function getList(OPNameCheck, opName, shaftNameCheck, measureName, EngineTypeIDCheck, model, itemNameCheck, measureContent, startTime, endTime, yangben, num, pageSize, pageCurrent) {
|
||||
return axios.post(ip + '/submit/QualityData_Histogram.ashx?type=GetDataTableByConditent&OPNameCheck=' + OPNameCheck + '&OPName=' + opName + '&shaftNameCheck=' + shaftNameCheck + '&shaftName=' + measureName + '&EngineTypeIDCheck=' + EngineTypeIDCheck + '&EngineTypeID=' + model + '&itemNameCheck=' + itemNameCheck + '&itemName=' + measureContent + '&startTime=' + startTime + '&endTime=' + endTime + '&Yangben=' + yangben + '&Num=' + num + '&page=' + pageCurrent + '&rows=' + pageSize)
|
||||
}
|
||||
// 获取图形数据--质量数据查询_综合查询_数据分组_绘趋势图_DC
|
||||
export function getLine(OPNameCheck, opName, shaftNameCheck, measureName, EngineTypeIDCheck, model, itemNameCheck, measureContent, startTime, endTime, yangben, num) {
|
||||
return axios.post(ip + '/submit/QualityData_Pareto.ashx?type=GetChart&OPNameCheck=' + OPNameCheck + '&OPName=' + opName + '&shaftNameCheck=' + shaftNameCheck + '&shaftName=' + measureName + '&EngineTypeIDCheck=' + EngineTypeIDCheck + '&EngineTypeID=' + model + '&itemNameCheck=' + itemNameCheck + '&itemName=' + measureContent + '&startTime=' + startTime + '&endTime=' + endTime + '&Yangben=' + yangben + '&Num=' + num)
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
import { ip } from '@/api/ipAddress'
|
||||
import axios from 'axios'
|
||||
|
||||
// 获取表格数据--质量数据_发动机质量数据_各个工位_视图_综合查询_趋势图_LLJ
|
||||
export function getList(OPNameCheck, opName, shaftNameCheck, shaftName, itemNameCheck, itemName, EngineTypeIDCheck, EngineTypeID, timeValue, pageSize, pageCurrent) {
|
||||
return axios.post(ip + '/submit/QualityData_TrendPictureBasic.ashx?type=GetDataTableByConditent&OPNameCheck=' + OPNameCheck + '&OPName=' + opName + '&shaftNameCheck=' + shaftNameCheck + '&shaftName=' + shaftName + '&itemNameCheck=' + itemNameCheck + '&itemName=' + itemName + '&EngineTypeIDCheck=' + EngineTypeIDCheck + '&EngineTypeID=' + EngineTypeID + '&startTime=' + timeValue[0] + '&endTime=' + timeValue[1] + '&page=' + pageCurrent + '&rows=' + pageSize)
|
||||
}
|
||||
// ------质量数据_发动机质量数据_各个工位_视图_综合查询_趋势图
|
||||
export function getLine(OPNameCheck, opName, shaftNameCheck, shaftName, itemNameCheck, itemName, EngineTypeIDCheck, EngineTypeID, startTime, endTime, pageSize, pageCurrent) {
|
||||
return axios.post(ip + '/submit/QualityData_TrendPictureBasic.ashx?type=GetMarkLineByConditent&OPNameCheck=' + OPNameCheck + '&OPName=' + opName + '&shaftNameCheck=' + shaftNameCheck + '&shaftName=' + shaftName + '&itemNameCheck=' + itemNameCheck + '&itemName=' + itemName + '&EngineTypeIDCheck=' + EngineTypeIDCheck + '&EngineTypeID=' + EngineTypeID + '&startTime=' + startTime + '&endTime=' + endTime + '&page=' + pageCurrent + '&rows=' + pageSize)
|
||||
}
|
||||
// 获取图形数据--质量数据查询_综合查询_绘趋势图_DC
|
||||
export function getEchart(OPNameCheck, opName, shaftNameCheck, shaftName, itemNameCheck, itemName, EngineTypeIDCheck, EngineTypeID, startTime, endTime) {
|
||||
return axios.post(ip + '/submit/QualityData_TrendPictureBasic.ashx?type=GetBaseTrendData&OPNameCheck=' + OPNameCheck + '&OPName=' + opName + '&shaftNameCheck=' + shaftNameCheck + '&shaftName=' + shaftName + '&itemNameCheck=' + itemNameCheck + '&itemName=' + itemName + '&EngineTypeIDCheck=' + EngineTypeIDCheck + '&EngineTypeID=' + EngineTypeID + '&startTime=' + startTime + '&endTime=' + endTime)
|
||||
}
|
||||
15
test/MES_Manage_View_V20/src/api/SPCanalysis/histogram.js
Normal file
@@ -0,0 +1,15 @@
|
||||
import { ip } from '@/api/ipAddress'
|
||||
import axios from 'axios'
|
||||
|
||||
// 获取表格数据--质量数据查询_综合查询_数据分组_大柴
|
||||
export function getList(OPNameCheck, opName, shaftNameCheck, measureName, EngineTypeIDCheck, model, itemNameCheck, measureContent, startTime, endTime, yangben, num, pageSize, pageCurrent) {
|
||||
return axios.post(ip + '/submit/QualityData_Histogram.ashx?type=GetDataTableByConditent&OPNameCheck=' + OPNameCheck + '&OPName=' + opName + '&shaftNameCheck=' + shaftNameCheck + '&shaftName=' + measureName + '&EngineTypeIDCheck=' + EngineTypeIDCheck + '&EngineTypeID=' + model + '&itemNameCheck=' + itemNameCheck + '&itemName=' + measureContent + '&startTime=' + startTime + '&endTime=' + endTime + '&Yangben=' + yangben + '&Num=' + num + '&page=' + pageCurrent + '&rows=' + pageSize)
|
||||
}
|
||||
// 获取图形数据--质量数据查询_综合查询_数据分组_大柴
|
||||
export function getLine(OPNameCheck, opName, shaftNameCheck, measureName, EngineTypeIDCheck, model, itemNameCheck, measureContent, startTime, endTime, yangben, num) {
|
||||
return axios.post(ip + '/submit/QualityData_Histogram.ashx?type=data1&OPNameCheck=' + OPNameCheck + '&OPName=' + opName + '&shaftNameCheck=' + shaftNameCheck + '&shaftName=' + measureName + '&EngineTypeIDCheck=' + EngineTypeIDCheck + '&EngineTypeID=' + model + '&itemNameCheck=' + itemNameCheck + '&itemName=' + measureContent + '&startTime=' + startTime + '&endTime=' + endTime + '&Yangben=' + yangben + '&Num=' + num)
|
||||
}
|
||||
// 获取x轴数据--质量数据查询_综合查询_数据分组_大柴
|
||||
export function getxData(OPNameCheck, opName, shaftNameCheck, measureName, EngineTypeIDCheck, model, itemNameCheck, measureContent, startTime, endTime, yangben, num) {
|
||||
return axios.post(ip + '/submit/QualityData_Histogram.ashx?type=data&OPNameCheck=' + OPNameCheck + '&OPName=' + opName + '&shaftNameCheck=' + shaftNameCheck + '&shaftName=' + measureName + '&EngineTypeIDCheck=' + EngineTypeIDCheck + '&EngineTypeID=' + model + '&itemNameCheck=' + itemNameCheck + '&itemName=' + measureContent + '&startTime=' + startTime + '&endTime=' + endTime + '&Yangben=' + yangben + '&Num=' + num)
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
import { ip } from '@/api/ipAddress'
|
||||
import axios from 'axios'
|
||||
|
||||
// 获取表格数据--质量数据查询_综合查询_数据分组_大柴
|
||||
export function bargetList(OPNameCheck, opName, shaftNameCheck, measureName, EngineTypeIDCheck, model, itemNameCheck, measureContent, startTime, endTime, yangben, num, pageSize, pageCurrent) {
|
||||
return axios.post(ip + '/submit/QualityData_Histogram.ashx?type=GetDataTableByConditent&OPNameCheck=' + OPNameCheck + '&OPName=' + opName + '&shaftNameCheck=' + shaftNameCheck + '&shaftName=' + measureName + '&EngineTypeIDCheck=' + EngineTypeIDCheck + '&EngineTypeID=' + model + '&itemNameCheck=' + itemNameCheck + '&itemName=' + measureContent + '&startTime=' + startTime + '&endTime=' + endTime + '&Yangben=' + yangben + '&Num=' + num + '&page=' + pageCurrent + '&rows=' + pageSize)
|
||||
}
|
||||
// 获取图形数据--质量数据查询_综合查询_数据分组_大柴
|
||||
export function bargetLine(OPNameCheck, opName, shaftNameCheck, measureName, EngineTypeIDCheck, model, itemNameCheck, measureContent, startTime, endTime, yangben, num) {
|
||||
return axios.post(ip + '/submit/QualityData_Histogram.ashx?type=data1&OPNameCheck=' + OPNameCheck + '&OPName=' + opName + '&shaftNameCheck=' + shaftNameCheck + '&shaftName=' + measureName + '&EngineTypeIDCheck=' + EngineTypeIDCheck + '&EngineTypeID=' + model + '&itemNameCheck=' + itemNameCheck + '&itemName=' + measureContent + '&startTime=' + startTime + '&endTime=' + endTime + '&Yangben=' + yangben + '&Num=' + num)
|
||||
}
|
||||
// 获取x轴数据--质量数据查询_综合查询_数据分组_大柴
|
||||
export function bargetxData(OPNameCheck, opName, shaftNameCheck, measureName, EngineTypeIDCheck, model, itemNameCheck, measureContent, startTime, endTime, yangben, num) {
|
||||
return axios.post(ip + '/submit/QualityData_Histogram.ashx?type=data&OPNameCheck=' + OPNameCheck + '&OPName=' + opName + '&shaftNameCheck=' + shaftNameCheck + '&shaftName=' + measureName + '&EngineTypeIDCheck=' + EngineTypeIDCheck + '&EngineTypeID=' + model + '&itemNameCheck=' + itemNameCheck + '&itemName=' + measureContent + '&startTime=' + startTime + '&endTime=' + endTime + '&Yangben=' + yangben + '&Num=' + num)
|
||||
}
|
||||
|
||||
// 获取表格数据--质量数据查询_综合查询_数据分组_大柴
|
||||
export function linegetList(OPNameCheck, opName, shaftNameCheck, measureName, EngineTypeIDCheck, model, itemNameCheck, measureContent, startTime, endTime, yangben, num, pageSize, pageCurrent) {
|
||||
return axios.post(ip + '/submit/QualityData_Histogram.ashx?type=GetDataTableByConditent&OPNameCheck=' + OPNameCheck + '&OPName=' + opName + '&shaftNameCheck=' + shaftNameCheck + '&shaftName=' + measureName + '&EngineTypeIDCheck=' + EngineTypeIDCheck + '&EngineTypeID=' + model + '&itemNameCheck=' + itemNameCheck + '&itemName=' + measureContent + '&startTime=' + startTime + '&endTime=' + endTime + '&Yangben=' + yangben + '&Num=' + num + '&page=' + pageCurrent + '&rows=' + pageSize)
|
||||
}
|
||||
// 获取图形数据
|
||||
export function linegetLine(OPNameCheck, opName, shaftNameCheck, measureName, EngineTypeIDCheck, model, itemNameCheck, measureContent, startTime, endTime, yangben, num, Usl, Lsl) {
|
||||
return axios.post(ip + '/submit/QualityData_NormalDistribution.ashx?type=GetBaseTrendData&OPNameCheck=' + OPNameCheck + '&OPName=' + opName + '&shaftNameCheck=' + shaftNameCheck + '&shaftName=' + measureName + '&EngineTypeIDCheck=' + EngineTypeIDCheck + '&EngineTypeID=' + model + '&itemNameCheck=' + itemNameCheck + '&itemName=' + measureContent + '&startTime=' + startTime + '&endTime=' + endTime + '&Yangben=' + yangben + '&Num=' + num + '&Usl=' + Usl + '&Lsl=' + Lsl)
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
import { ip } from '@/api/ipAddress'
|
||||
import axios from 'axios'
|
||||
|
||||
// 获取表格数据--质量数据查询_综合查询_数据分组_大柴
|
||||
export function getList(OPNameCheck, opName, shaftNameCheck, measureName, EngineTypeIDCheck, model, itemNameCheck, measureContent, startTime, endTime, yangben, num, pageSize, pageCurrent) {
|
||||
return axios.post(ip + '/submit/QualityData_Histogram.ashx?type=GetDataTableByConditent&OPNameCheck=' + OPNameCheck + '&OPName=' + opName + '&shaftNameCheck=' + shaftNameCheck + '&shaftName=' + measureName + '&EngineTypeIDCheck=' + EngineTypeIDCheck + '&EngineTypeID=' + model + '&itemNameCheck=' + itemNameCheck + '&itemName=' + measureContent + '&startTime=' + startTime + '&endTime=' + endTime + '&Yangben=' + yangben + '&Num=' + num + '&page=' + pageCurrent + '&rows=' + pageSize)
|
||||
}
|
||||
// 获取图形数据
|
||||
export function getLine(OPNameCheck, opName, shaftNameCheck, measureName, EngineTypeIDCheck, model, itemNameCheck, measureContent, startTime, endTime, yangben, num, Usl, Lsl) {
|
||||
return axios.post(ip + '/submit/QualityData_NormalDistribution.ashx?type=GetBaseTrendData&OPNameCheck=' + OPNameCheck + '&OPName=' + opName + '&shaftNameCheck=' + shaftNameCheck + '&shaftName=' + measureName + '&EngineTypeIDCheck=' + EngineTypeIDCheck + '&EngineTypeID=' + model + '&itemNameCheck=' + itemNameCheck + '&itemName=' + measureContent + '&startTime=' + startTime + '&endTime=' + endTime + '&Yangben=' + yangben + '&Num=' + num + '&Usl=' + Usl + '&Lsl=' + Lsl)
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
import { ip } from '@/api/ipAddress'
|
||||
import axios from 'axios'
|
||||
|
||||
// 获取表格数据--质量数据查询_综合查询_数据分组_大柴
|
||||
export function getList(OPNameCheck, opName, shaftNameCheck, measureName, EngineTypeIDCheck, model, itemNameCheck, measureContent, startTime, endTime, yangben, num, pageSize, pageCurrent) {
|
||||
return axios.post(ip + '/submit/QualityData_TrendPicture.ashx?type=GetDataTableByConditent&OPNameCheck=' + OPNameCheck + '&OPName=' + opName + '&shaftNameCheck=' + shaftNameCheck + '&shaftName=' + measureName + '&EngineTypeIDCheck=' + EngineTypeIDCheck + '&EngineTypeID=' + model + '&itemNameCheck=' + itemNameCheck + '&itemName=' + measureContent + '&startTime=' + startTime + '&endTime=' + endTime + '&Yangben=' + yangben + '&Num=' + num + '&page=' + pageCurrent + '&rows=' + pageSize)
|
||||
}
|
||||
// 获取图形数据--质量数据查询_综合查询_数据分组_绘趋势图_DC
|
||||
export function getLine(OPNameCheck, opName, shaftNameCheck, measureName, EngineTypeIDCheck, model, itemNameCheck, measureContent, startTime, endTime, yangben, num) {
|
||||
return axios.post(ip + '/submit/QualityData_TrendPicture.ashx?type=GetBaseTrendData&OPNameCheck=' + OPNameCheck + '&OPName=' + opName + '&shaftNameCheck=' + shaftNameCheck + '&shaftName=' + measureName + '&EngineTypeIDCheck=' + EngineTypeIDCheck + '&EngineTypeID=' + model + '&itemNameCheck=' + itemNameCheck + '&itemName=' + measureContent + '&startTime=' + startTime + '&endTime=' + endTime + '&Yangben=' + yangben + '&Num=' + num)
|
||||
}
|
||||
98
test/MES_Manage_View_V20/src/api/b1s.js
Normal file
@@ -0,0 +1,98 @@
|
||||
// src/api/b1s.js
|
||||
import axios from 'axios';
|
||||
|
||||
|
||||
// 创建 axios 实例
|
||||
const b1s = axios.create({
|
||||
timeout: 100000,
|
||||
baseURL: window.dt_Config.baseURLB1,
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
export async function getB1(url, params) {
|
||||
try {
|
||||
|
||||
// const paramsGet = {
|
||||
// func:"GET",
|
||||
// cmd: url.replace('/', ''),
|
||||
// content: new URLSearchParams(params).toString()//.replace('%24', '')
|
||||
// }
|
||||
const paramsGet = {
|
||||
func:"GET",
|
||||
cmd: url.replace('/', ''),
|
||||
content: JSON.stringify(params)
|
||||
}
|
||||
const res = await b1s.post('',paramsGet);
|
||||
return { success: true, data: res.data };
|
||||
} catch (error) {
|
||||
console.log('GET', error)
|
||||
const msg = extractB1Error(error);
|
||||
return { success: false, message: msg };
|
||||
}
|
||||
}
|
||||
|
||||
export async function postB1(url, data) {
|
||||
try {
|
||||
const params = {
|
||||
func:"POST",
|
||||
cmd: url.replace('/', ''),
|
||||
content: JSON.stringify(data)
|
||||
}
|
||||
const res = await b1s.post('', params);
|
||||
console.log(res)
|
||||
return { success: true, data: res.data };
|
||||
} catch (error) {
|
||||
console.log('POST', error)
|
||||
const msg = extractB1Error(error);
|
||||
return { success: false, message: msg };
|
||||
}
|
||||
}
|
||||
export async function patchB1(url, data) {
|
||||
try {
|
||||
const params = {
|
||||
func:"PATCH",
|
||||
cmd: url.replace('/', ''),
|
||||
content: JSON.stringify(data)
|
||||
}
|
||||
const res = await b1s.post('', params);
|
||||
console.log('PATCH 请求成功:', res);
|
||||
return { success: true, data: res.data };
|
||||
} catch (error) {
|
||||
console.log('PATCH', error)
|
||||
const msg = extractB1Error(error); // 複用你的錯誤提取函數
|
||||
console.error('PATCH 请求失败:', msg);
|
||||
return { success: false, message: msg };
|
||||
}
|
||||
}
|
||||
|
||||
// src/api/b1s.js 内部定义
|
||||
function extractB1Error(error) {
|
||||
if (!error) return '未知错误';
|
||||
|
||||
// 优先取 SAP B1 返回的错误信息
|
||||
if (
|
||||
error.response &&
|
||||
error.response.data &&
|
||||
error.response.data.error
|
||||
) {
|
||||
const b1Error = error.response.data.error;
|
||||
if (b1Error.message && b1Error.message.value) {
|
||||
return b1Error.message.value;
|
||||
} else if (typeof b1Error.message === 'string') {
|
||||
return b1Error.message;
|
||||
} else {
|
||||
return b1Error.code || 'SAP B1 错误';
|
||||
}
|
||||
}
|
||||
|
||||
// 网络错误、超时等
|
||||
if (error.message) {
|
||||
return error.message;
|
||||
}
|
||||
|
||||
return '请求失败,请检查网络或服务状态';
|
||||
}
|
||||
|
||||
4
test/MES_Manage_View_V20/src/api/ipAddress.js
Normal file
@@ -0,0 +1,4 @@
|
||||
export const ip = 'http://localhost:8051'
|
||||
// export const ip = 'http://124.220.15.242:8154' // AP
|
||||
// export const ip = 'http://124.220.15.242:8153' // 福田
|
||||
|
||||
44
test/MES_Manage_View_V20/src/api/login.js
Normal file
@@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
import state from '@/store'
|
||||
import router from '@/router'
|
||||
export function login(username, password) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '1',
|
||||
name: '菜单模块系统_用户名密码_查询数据',
|
||||
param: `用户名=${username}&密码=${password}`
|
||||
}
|
||||
})
|
||||
}
|
||||
//
|
||||
export function getInfo(token) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '1',
|
||||
name: '菜单模块系统_项目角色模块列表_二级_查询数据',
|
||||
param: `角色编号=${token}`
|
||||
}
|
||||
})
|
||||
}
|
||||
// 修改密码
|
||||
export function editPassword(num1, num2, num3, num4) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '2',
|
||||
name: '账号信息_修改密码_MESWORK',
|
||||
param: '考勤编号=' + num1 + '=string&原始密码=' + num2 + '=string&新密码=' + num3 + '=string&返回=' + num4 + '=string=output'
|
||||
}
|
||||
})
|
||||
}
|
||||
96
test/MES_Manage_View_V20/src/api/tm.js
Normal file
@@ -0,0 +1,96 @@
|
||||
// src/api/b1s.js
|
||||
import axios from 'axios';
|
||||
|
||||
// 创建 axios 实例
|
||||
const tm = axios.create({
|
||||
timeout: 100000,
|
||||
baseURL: window.dt_Config.baseURLtm,
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
export async function gettm(url, params) {
|
||||
try {
|
||||
|
||||
// const paramsGet = {
|
||||
// func:"GET",
|
||||
// cmd: url.replace('/', ''),
|
||||
// content: new URLSearchParams(params).toString()//.replace('%24', '')
|
||||
// }
|
||||
const paramsGet = {
|
||||
func:"GET",
|
||||
cmd: url.replace('/', ''),
|
||||
content: JSON.stringify(params)
|
||||
}
|
||||
const res = await tm.post('',paramsGet);
|
||||
return { success: true, data: res.data };
|
||||
} catch (error) {
|
||||
console.log('GET', error)
|
||||
const msg = extractB1Error(error);
|
||||
return { success: false, message: msg };
|
||||
}
|
||||
}
|
||||
|
||||
export async function posttm(url, data) {
|
||||
try {
|
||||
const params = {
|
||||
func:"POST",
|
||||
cmd: url.replace('/', ''),
|
||||
content: JSON.stringify(data)
|
||||
}
|
||||
const res = await tm.post('', params);
|
||||
console.log(res)
|
||||
return { success: true, data: res.data };
|
||||
} catch (error) {
|
||||
console.log('POST', error)
|
||||
const msg = extractB1Error(error);
|
||||
return { success: false, message: msg };
|
||||
}
|
||||
}
|
||||
export async function patchtm(url, data) {
|
||||
try {
|
||||
const params = {
|
||||
func:"PATCH",
|
||||
cmd: url.replace('/', ''),
|
||||
content: JSON.stringify(data)
|
||||
}
|
||||
const res = await tm.post('', params);
|
||||
console.log('PATCH 请求成功:', res);
|
||||
return { success: true, data: res.data };
|
||||
} catch (error) {
|
||||
console.log('PATCH', error)
|
||||
const msg = extractB1Error(error); // 複用你的錯誤提取函數
|
||||
console.error('PATCH 请求失败:', msg);
|
||||
return { success: false, message: msg };
|
||||
}
|
||||
}
|
||||
|
||||
// src/api/b1s.js 内部定义
|
||||
function extractB1Error(error) {
|
||||
if (!error) return '未知错误';
|
||||
|
||||
// 优先取 SAP B1 返回的错误信息
|
||||
if (
|
||||
error.response &&
|
||||
error.response.data &&
|
||||
error.response.data.error
|
||||
) {
|
||||
const b1Error = error.response.data.error;
|
||||
if (b1Error.message && b1Error.message.value) {
|
||||
return b1Error.message.value;
|
||||
} else if (typeof b1Error.message === 'string') {
|
||||
return b1Error.message;
|
||||
} else {
|
||||
return b1Error.code || 'SAP B1 错误';
|
||||
}
|
||||
}
|
||||
|
||||
// 网络错误、超时等
|
||||
if (error.message) {
|
||||
return error.message;
|
||||
}
|
||||
|
||||
return '请求失败,请检查网络或服务状态';
|
||||
}
|
||||
BIN
test/MES_Manage_View_V20/src/assets/404_images/404.png
Normal file
|
After Width: | Height: | Size: 96 KiB |
BIN
test/MES_Manage_View_V20/src/assets/404_images/404_cloud.png
Normal file
|
After Width: | Height: | Size: 4.7 KiB |
BIN
test/MES_Manage_View_V20/src/assets/img/DFlogo.png
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
test/MES_Manage_View_V20/src/assets/img/Init1.png
Normal file
|
After Width: | Height: | Size: 162 B |
BIN
test/MES_Manage_View_V20/src/assets/img/blueTWinkle.gif
Normal file
|
After Width: | Height: | Size: 103 B |
BIN
test/MES_Manage_View_V20/src/assets/img/gray.png
Normal file
|
After Width: | Height: | Size: 951 B |
BIN
test/MES_Manage_View_V20/src/assets/img/grayTwinkle.gif
Normal file
|
After Width: | Height: | Size: 103 B |
BIN
test/MES_Manage_View_V20/src/assets/img/green.png
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
test/MES_Manage_View_V20/src/assets/img/index.png
Normal file
|
After Width: | Height: | Size: 624 KiB |
BIN
test/MES_Manage_View_V20/src/assets/img/leftPic.png
Normal file
|
After Width: | Height: | Size: 139 KiB |
BIN
test/MES_Manage_View_V20/src/assets/img/logo.png
Normal file
|
After Width: | Height: | Size: 28 KiB |
BIN
test/MES_Manage_View_V20/src/assets/img/user.jpg
Normal file
|
After Width: | Height: | Size: 23 KiB |
BIN
test/MES_Manage_View_V20/src/assets/img/yellowTwinkle.gif
Normal file
|
After Width: | Height: | Size: 103 B |
@@ -0,0 +1,92 @@
|
||||
/**
|
||||
* @desc 验证整数类型数字方法
|
||||
* @param {Object} e
|
||||
* @param {regular} reg 正则
|
||||
* @param {Number} charcode 键盘code
|
||||
* */
|
||||
const checkNumber = (e, reg, charcode) => {
|
||||
if (!reg.test(String.fromCharCode(charcode)) && charcode > 9 && !e.ctrlKey) {
|
||||
if (e.preventDefault) {
|
||||
e.preventDefault()
|
||||
} else {
|
||||
e.returnValue = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @desc 验证浮点类型小数方法(建议用text类型的表单)
|
||||
* @param {Object} e
|
||||
* @param {regular} reg 正则
|
||||
* @param {Number} charcode 键盘code
|
||||
* @param {Object} el dom对象
|
||||
* */
|
||||
const checkFloat = (e, reg, charcode, el) => {
|
||||
if (charcode === 46) {
|
||||
if (el.children[0].value.includes('.')) {
|
||||
e.preventDefault()
|
||||
}
|
||||
return
|
||||
} else if (
|
||||
!reg.test(String.fromCharCode(charcode)) &&
|
||||
charcode > 9 &&
|
||||
!e.ctrlKey
|
||||
) {
|
||||
if (e.preventDefault) {
|
||||
e.preventDefault()
|
||||
} else {
|
||||
e.returnValue = false
|
||||
}
|
||||
}
|
||||
}
|
||||
const loading = (e, el, bind) => {
|
||||
el.disabled = true
|
||||
setTimeout(function() {
|
||||
el.disabled = false
|
||||
}, 3000)
|
||||
}
|
||||
/**
|
||||
* @author LeeYunxiang
|
||||
* @description 限制数字输入格式 int => 正整数 , num => 自然数(正整数包括0) , float => 正数包括小数(建议用text类型的input表单)
|
||||
* */
|
||||
export default {
|
||||
key: 'positive',
|
||||
func: {
|
||||
inserted(el, bind) {
|
||||
el.addEventListener('keypress', e => {
|
||||
e = e || window.event
|
||||
const charcode = typeof e.charCode === 'number' ? e.charCode : e.keyCode
|
||||
let reg = null
|
||||
switch (bind.value) {
|
||||
case 'num':
|
||||
reg = /\d/
|
||||
checkNumber(e, reg, charcode)
|
||||
break
|
||||
case 'int':
|
||||
if (el.children[0].value.length === 0) {
|
||||
reg = /^[1-9]$/
|
||||
} else {
|
||||
reg = /\d/
|
||||
}
|
||||
checkNumber(e, reg, charcode)
|
||||
break
|
||||
case 'float':
|
||||
reg = /\d/
|
||||
checkFloat(e, reg, charcode, el)
|
||||
break
|
||||
case 'notZero':
|
||||
reg = (/^[1-9][0-9]*$/)
|
||||
checkFloat(e, reg, charcode, el)
|
||||
break
|
||||
}
|
||||
})
|
||||
el.addEventListener('click', e => {
|
||||
switch (bind.value) {
|
||||
case 'loading':
|
||||
loading(e, el, bind)
|
||||
break
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
import AmountInputBox from './AmountInputBox.js'
|
||||
const directives = [AmountInputBox]
|
||||
export default {
|
||||
install: Vue => {
|
||||
if (directives.length && directives.length > 0) {
|
||||
directives.map(item => {
|
||||
Vue.directive(item.key, item.func)
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
59
test/MES_Manage_View_V20/src/components/Breadcrumb/index.vue
Normal file
@@ -0,0 +1,59 @@
|
||||
<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-2" class="no-redirect">{{
|
||||
item.meta.title
|
||||
}}</span>
|
||||
<router-link v-else :to="item.redirect||item.path" style="color: white">{{ item.meta.title }}</router-link>
|
||||
</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 lang="scss" rel="stylesheet/scss" scoped>
|
||||
.app-breadcrumb.el-breadcrumb {
|
||||
display: inline-block;
|
||||
font-size: 13px;
|
||||
line-height: 50px;
|
||||
color: #fff;
|
||||
margin-left: 0;
|
||||
|
||||
.no-redirect {
|
||||
color: white;
|
||||
cursor: text;
|
||||
}
|
||||
}
|
||||
|
||||
::v-deep .el-breadcrumb__separator {
|
||||
margin: 0 12px;
|
||||
}
|
||||
</style>
|
||||
526
test/MES_Manage_View_V20/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
test/MES_Manage_View_V20/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>
|
||||
63
test/MES_Manage_View_V20/src/components/Hamburger/index.vue
Normal file
@@ -0,0 +1,63 @@
|
||||
<template>
|
||||
<div>
|
||||
<svg
|
||||
:class="{'is-active':isActive}"
|
||||
t="1492500959545"
|
||||
class="hamburger"
|
||||
style="color: #fff"
|
||||
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"
|
||||
style="fill: #fff"/>
|
||||
<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"
|
||||
style="fill: #fff"/>
|
||||
<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"
|
||||
style="fill: #fff"/>
|
||||
</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%;
|
||||
color: #fff
|
||||
}
|
||||
.hamburger.is-active {
|
||||
transform: rotate(0deg);
|
||||
color: #fff
|
||||
}
|
||||
</style>
|
||||
72
test/MES_Manage_View_V20/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)) {
|
||||
console.log(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>
|
||||
91
test/MES_Manage_View_V20/src/components/Sticky/index.vue
Normal file
@@ -0,0 +1,91 @@
|
||||
<template>
|
||||
<div :style="{height:height+'px',zIndex:zIndex}">
|
||||
<div
|
||||
:class="className"
|
||||
:style="{top:(isSticky ? stickyTop +'px' : ''),zIndex:zIndex,position:position,width:width,height:height+'px'}"
|
||||
>
|
||||
<slot>
|
||||
<div>sticky</div>
|
||||
</slot>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'Sticky',
|
||||
props: {
|
||||
stickyTop: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
zIndex: {
|
||||
type: Number,
|
||||
default: 1
|
||||
},
|
||||
className: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
active: false,
|
||||
position: '',
|
||||
width: undefined,
|
||||
height: undefined,
|
||||
isSticky: false
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.height = this.$el.getBoundingClientRect().height
|
||||
window.addEventListener('scroll', this.handleScroll)
|
||||
window.addEventListener('resize', this.handleReize)
|
||||
},
|
||||
activated() {
|
||||
this.handleScroll()
|
||||
},
|
||||
destroyed() {
|
||||
window.removeEventListener('scroll', this.handleScroll)
|
||||
window.removeEventListener('resize', this.handleReize)
|
||||
},
|
||||
methods: {
|
||||
sticky() {
|
||||
if (this.active) {
|
||||
return
|
||||
}
|
||||
this.position = 'fixed'
|
||||
this.active = true
|
||||
this.width = this.width + 'px'
|
||||
this.isSticky = true
|
||||
},
|
||||
handleReset() {
|
||||
if (!this.active) {
|
||||
return
|
||||
}
|
||||
this.reset()
|
||||
},
|
||||
reset() {
|
||||
this.position = ''
|
||||
this.width = 'auto'
|
||||
this.active = false
|
||||
this.isSticky = false
|
||||
},
|
||||
handleScroll() {
|
||||
const width = this.$el.getBoundingClientRect().width
|
||||
this.width = width || 'auto'
|
||||
const offsetTop = this.$el.getBoundingClientRect().top
|
||||
if (offsetTop < this.stickyTop) {
|
||||
this.sticky()
|
||||
return
|
||||
}
|
||||
this.handleReset()
|
||||
},
|
||||
handleReize() {
|
||||
if (this.isSticky) {
|
||||
this.width = this.$el.getBoundingClientRect().width + 'px'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
43
test/MES_Manage_View_V20/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>
|
||||
@@ -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
test/MES_Manage_View_V20/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>
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
test/MES_Manage_View_V20/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
test/MES_Manage_View_V20/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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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
test/MES_Manage_View_V20/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
test/MES_Manage_View_V20/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
test/MES_Manage_View_V20/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
test/MES_Manage_View_V20/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)
|
||||
}
|
||||
}
|
||||
|
||||
539
test/MES_Manage_View_V20/src/icon/demo.css
Normal file
@@ -0,0 +1,539 @@
|
||||
/* Logo 字体 */
|
||||
@font-face {
|
||||
font-family: "iconfont logo";
|
||||
src: url('https://at.alicdn.com/t/font_985780_km7mi63cihi.eot?t=1545807318834');
|
||||
src: url('https://at.alicdn.com/t/font_985780_km7mi63cihi.eot?t=1545807318834#iefix') format('embedded-opentype'),
|
||||
url('https://at.alicdn.com/t/font_985780_km7mi63cihi.woff?t=1545807318834') format('woff'),
|
||||
url('https://at.alicdn.com/t/font_985780_km7mi63cihi.ttf?t=1545807318834') format('truetype'),
|
||||
url('https://at.alicdn.com/t/font_985780_km7mi63cihi.svg?t=1545807318834#iconfont') format('svg');
|
||||
}
|
||||
|
||||
.logo {
|
||||
font-family: "iconfont logo";
|
||||
font-size: 160px;
|
||||
font-style: normal;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
/* tabs */
|
||||
.nav-tabs {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.nav-tabs .nav-more {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
height: 42px;
|
||||
line-height: 42px;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
#tabs {
|
||||
border-bottom: 1px solid #eee;
|
||||
}
|
||||
|
||||
#tabs li {
|
||||
cursor: pointer;
|
||||
width: 100px;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
text-align: center;
|
||||
font-size: 16px;
|
||||
border-bottom: 2px solid transparent;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
margin-bottom: -1px;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
|
||||
#tabs .active {
|
||||
border-bottom-color: #f00;
|
||||
color: #222;
|
||||
}
|
||||
|
||||
.tab-container .content {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* 页面布局 */
|
||||
.main {
|
||||
padding: 30px 100px;
|
||||
width: 960px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.main .logo {
|
||||
color: #333;
|
||||
text-align: left;
|
||||
margin-bottom: 30px;
|
||||
line-height: 1;
|
||||
height: 110px;
|
||||
margin-top: -50px;
|
||||
overflow: hidden;
|
||||
*zoom: 1;
|
||||
}
|
||||
|
||||
.main .logo a {
|
||||
font-size: 160px;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.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;
|
||||
overflow: hidden;
|
||||
*zoom: 1;
|
||||
}
|
||||
|
||||
.icon_lists li {
|
||||
width: 100px;
|
||||
margin-bottom: 10px;
|
||||
margin-right: 20px;
|
||||
text-align: center;
|
||||
list-style: none !important;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.icon_lists li .code-name {
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
.icon_lists .icon {
|
||||
display: block;
|
||||
height: 100px;
|
||||
line-height: 100px;
|
||||
font-size: 42px;
|
||||
margin: 10px auto;
|
||||
color: #333;
|
||||
-webkit-transition: font-size 0.25s linear, width 0.25s linear;
|
||||
-moz-transition: font-size 0.25s linear, width 0.25s linear;
|
||||
transition: font-size 0.25s linear, width 0.25s linear;
|
||||
}
|
||||
|
||||
.icon_lists .icon:hover {
|
||||
font-size: 100px;
|
||||
}
|
||||
|
||||
.icon_lists .svg-icon {
|
||||
/* 通过设置 font-size 来改变图标大小 */
|
||||
width: 1em;
|
||||
/* 图标和文字相邻时,垂直对齐 */
|
||||
vertical-align: -0.15em;
|
||||
/* 通过设置 color 来改变 SVG 的颜色/fill */
|
||||
fill: currentColor;
|
||||
/* path 和 stroke 溢出 viewBox 部分在 IE 下会显示
|
||||
normalize.css 中也包含这行 */
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.icon_lists li .name,
|
||||
.icon_lists li .code-name {
|
||||
color: #666;
|
||||
}
|
||||
|
||||
/* markdown 样式 */
|
||||
.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 {
|
||||
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 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;
|
||||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
|
||||
/* 代码高亮 */
|
||||
/* PrismJS 1.15.0
|
||||
https://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javascript */
|
||||
/**
|
||||
* prism.js default theme for JavaScript, CSS and HTML
|
||||
* Based on dabblet (http://dabblet.com)
|
||||
* @author Lea Verou
|
||||
*/
|
||||
code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
color: black;
|
||||
background: none;
|
||||
text-shadow: 0 1px white;
|
||||
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
|
||||
text-align: left;
|
||||
white-space: pre;
|
||||
word-spacing: normal;
|
||||
word-break: normal;
|
||||
word-wrap: normal;
|
||||
line-height: 1.5;
|
||||
|
||||
-moz-tab-size: 4;
|
||||
-o-tab-size: 4;
|
||||
tab-size: 4;
|
||||
|
||||
-webkit-hyphens: none;
|
||||
-moz-hyphens: none;
|
||||
-ms-hyphens: none;
|
||||
hyphens: none;
|
||||
}
|
||||
|
||||
pre[class*="language-"]::-moz-selection,
|
||||
pre[class*="language-"] ::-moz-selection,
|
||||
code[class*="language-"]::-moz-selection,
|
||||
code[class*="language-"] ::-moz-selection {
|
||||
text-shadow: none;
|
||||
background: #b3d4fc;
|
||||
}
|
||||
|
||||
pre[class*="language-"]::selection,
|
||||
pre[class*="language-"] ::selection,
|
||||
code[class*="language-"]::selection,
|
||||
code[class*="language-"] ::selection {
|
||||
text-shadow: none;
|
||||
background: #b3d4fc;
|
||||
}
|
||||
|
||||
@media print {
|
||||
|
||||
code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
text-shadow: none;
|
||||
}
|
||||
}
|
||||
|
||||
/* Code blocks */
|
||||
pre[class*="language-"] {
|
||||
padding: 1em;
|
||||
margin: .5em 0;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
:not(pre)>code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
background: #f5f2f0;
|
||||
}
|
||||
|
||||
/* Inline code */
|
||||
:not(pre)>code[class*="language-"] {
|
||||
padding: .1em;
|
||||
border-radius: .3em;
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
.token.comment,
|
||||
.token.prolog,
|
||||
.token.doctype,
|
||||
.token.cdata {
|
||||
color: slategray;
|
||||
}
|
||||
|
||||
.token.punctuation {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.namespace {
|
||||
opacity: .7;
|
||||
}
|
||||
|
||||
.token.property,
|
||||
.token.tag,
|
||||
.token.boolean,
|
||||
.token.number,
|
||||
.token.constant,
|
||||
.token.symbol,
|
||||
.token.deleted {
|
||||
color: #905;
|
||||
}
|
||||
|
||||
.token.selector,
|
||||
.token.attr-name,
|
||||
.token.string,
|
||||
.token.char,
|
||||
.token.builtin,
|
||||
.token.inserted {
|
||||
color: #690;
|
||||
}
|
||||
|
||||
.token.operator,
|
||||
.token.entity,
|
||||
.token.url,
|
||||
.language-css .token.string,
|
||||
.style .token.string {
|
||||
color: #9a6e3a;
|
||||
background: hsla(0, 0%, 100%, .5);
|
||||
}
|
||||
|
||||
.token.atrule,
|
||||
.token.attr-value,
|
||||
.token.keyword {
|
||||
color: #07a;
|
||||
}
|
||||
|
||||
.token.function,
|
||||
.token.class-name {
|
||||
color: #DD4A68;
|
||||
}
|
||||
|
||||
.token.regex,
|
||||
.token.important,
|
||||
.token.variable {
|
||||
color: #e90;
|
||||
}
|
||||
|
||||
.token.important,
|
||||
.token.bold {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.token.italic {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.token.entity {
|
||||
cursor: help;
|
||||
}
|
||||
303
test/MES_Manage_View_V20/src/icon/demo_index.html
Normal file
@@ -0,0 +1,303 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<title>iconfont Demo</title>
|
||||
<link rel="shortcut icon" href="//img.alicdn.com/imgextra/i2/O1CN01ZyAlrn1MwaMhqz36G_!!6000000001499-73-tps-64-64.ico" type="image/x-icon"/>
|
||||
<link rel="icon" type="image/svg+xml" href="//img.alicdn.com/imgextra/i4/O1CN01EYTRnJ297D6vehehJ_!!6000000008020-55-tps-64-64.svg"/>
|
||||
<link rel="stylesheet" href="https://g.alicdn.com/thx/cube/1.3.2/cube.min.css">
|
||||
<link rel="stylesheet" href="demo.css">
|
||||
<link rel="stylesheet" href="iconfont.css">
|
||||
<script src="iconfont.js"></script>
|
||||
<!-- jQuery -->
|
||||
<script src="https://a1.alicdn.com/oss/uploads/2018/12/26/7bfddb60-08e8-11e9-9b04-53e73bb6408b.js"></script>
|
||||
<!-- 代码高亮 -->
|
||||
<script src="https://a1.alicdn.com/oss/uploads/2018/12/26/a3f714d0-08e6-11e9-8a15-ebf944d7534c.js"></script>
|
||||
<style>
|
||||
.main .logo {
|
||||
margin-top: 0;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.main .logo a {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.main .logo .sub-title {
|
||||
margin-left: 0.5em;
|
||||
font-size: 22px;
|
||||
color: #fff;
|
||||
background: linear-gradient(-45deg, #3967FF, #B500FE);
|
||||
-webkit-background-clip: text;
|
||||
-webkit-text-fill-color: transparent;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="main">
|
||||
<h1 class="logo"><a href="https://www.iconfont.cn/" title="iconfont 首页" target="_blank">
|
||||
<img width="200" src="https://img.alicdn.com/imgextra/i3/O1CN01Mn65HV1FfSEzR6DKv_!!6000000000514-55-tps-228-59.svg">
|
||||
|
||||
</a></h1>
|
||||
<div class="nav-tabs">
|
||||
<ul id="tabs" class="dib-box">
|
||||
<li class="dib active"><span>Unicode</span></li>
|
||||
<li class="dib"><span>Font class</span></li>
|
||||
<li class="dib"><span>Symbol</span></li>
|
||||
</ul>
|
||||
|
||||
<a href="https://www.iconfont.cn/manage/index?manage_type=myprojects&projectId=2669478" target="_blank" class="nav-more">查看项目</a>
|
||||
|
||||
</div>
|
||||
<div class="tab-container">
|
||||
<div class="content unicode" style="display: block;">
|
||||
<ul class="icon_lists dib-box">
|
||||
|
||||
<li class="dib">
|
||||
<span class="icon iconfont"></span>
|
||||
<div class="name">设 置</div>
|
||||
<div class="code-name">&#xe60b;</div>
|
||||
</li>
|
||||
|
||||
<li class="dib">
|
||||
<span class="icon iconfont"></span>
|
||||
<div class="name">模块</div>
|
||||
<div class="code-name">&#xec07;</div>
|
||||
</li>
|
||||
|
||||
<li class="dib">
|
||||
<span class="icon iconfont"></span>
|
||||
<div class="name">维修</div>
|
||||
<div class="code-name">&#xe63a;</div>
|
||||
</li>
|
||||
|
||||
<li class="dib">
|
||||
<span class="icon iconfont"></span>
|
||||
<div class="name">物料</div>
|
||||
<div class="code-name">&#xe6fb;</div>
|
||||
</li>
|
||||
|
||||
<li class="dib">
|
||||
<span class="icon iconfont"></span>
|
||||
<div class="name">零件</div>
|
||||
<div class="code-name">&#xe679;</div>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
<div class="article markdown">
|
||||
<h2 id="unicode-">Unicode 引用</h2>
|
||||
<hr>
|
||||
|
||||
<p>Unicode 是字体在网页端最原始的应用方式,特点是:</p>
|
||||
<ul>
|
||||
<li>支持按字体的方式去动态调整图标大小,颜色等等。</li>
|
||||
<li>默认情况下不支持多色,直接添加多色图标会自动去色。</li>
|
||||
</ul>
|
||||
<blockquote>
|
||||
<p>注意:新版 iconfont 支持两种方式引用多色图标:SVG symbol 引用方式和彩色字体图标模式。(使用彩色字体图标需要在「编辑项目」中开启「彩色」选项后并重新生成。)</p>
|
||||
</blockquote>
|
||||
<p>Unicode 使用步骤如下:</p>
|
||||
<h3 id="-font-face">第一步:拷贝项目下面生成的 <code>@font-face</code></h3>
|
||||
<pre><code class="language-css"
|
||||
>@font-face {
|
||||
font-family: 'iconfont';
|
||||
src: url('iconfont.woff2?t=1626138435815') format('woff2'),
|
||||
url('iconfont.woff?t=1626138435815') format('woff'),
|
||||
url('iconfont.ttf?t=1626138435815') format('truetype');
|
||||
}
|
||||
</code></pre>
|
||||
<h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3>
|
||||
<pre><code class="language-css"
|
||||
>.iconfont {
|
||||
font-family: "iconfont" !important;
|
||||
font-size: 16px;
|
||||
font-style: normal;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
</code></pre>
|
||||
<h3 id="-">第三步:挑选相应图标并获取字体编码,应用于页面</h3>
|
||||
<pre>
|
||||
<code class="language-html"
|
||||
><span class="iconfont">&#x33;</span>
|
||||
</code></pre>
|
||||
<blockquote>
|
||||
<p>"iconfont" 是你项目下的 font-family。可以通过编辑项目查看,默认是 "iconfont"。</p>
|
||||
</blockquote>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content font-class">
|
||||
<ul class="icon_lists dib-box">
|
||||
|
||||
<li class="dib">
|
||||
<span class="icon iconfont el-icon-cjnshezhi"></span>
|
||||
<div class="name">
|
||||
设 置
|
||||
</div>
|
||||
<div class="code-name">.el-icon-cjnshezhi
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li class="dib">
|
||||
<span class="icon iconfont el-icon-cjnmodule"></span>
|
||||
<div class="name">
|
||||
模块
|
||||
</div>
|
||||
<div class="code-name">.el-icon-cjnmodule
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li class="dib">
|
||||
<span class="icon iconfont el-icon-cjnweixiu"></span>
|
||||
<div class="name">
|
||||
维修
|
||||
</div>
|
||||
<div class="code-name">.el-icon-cjnweixiu
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li class="dib">
|
||||
<span class="icon iconfont el-icon-cjnwuliao"></span>
|
||||
<div class="name">
|
||||
物料
|
||||
</div>
|
||||
<div class="code-name">.el-icon-cjnwuliao
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li class="dib">
|
||||
<span class="icon iconfont el-icon-cjna50gongyegongcheng_lingjian"></span>
|
||||
<div class="name">
|
||||
零件
|
||||
</div>
|
||||
<div class="code-name">.el-icon-cjna50gongyegongcheng_lingjian
|
||||
</div>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
<div class="article markdown">
|
||||
<h2 id="font-class-">font-class 引用</h2>
|
||||
<hr>
|
||||
|
||||
<p>font-class 是 Unicode 使用方式的一种变种,主要是解决 Unicode 书写不直观,语意不明确的问题。</p>
|
||||
<p>与 Unicode 使用方式相比,具有如下特点:</p>
|
||||
<ul>
|
||||
<li>相比于 Unicode 语意明确,书写更直观。可以很容易分辨这个 icon 是什么。</li>
|
||||
<li>因为使用 class 来定义图标,所以当要替换图标时,只需要修改 class 里面的 Unicode 引用。</li>
|
||||
</ul>
|
||||
<p>使用步骤如下:</p>
|
||||
<h3 id="-fontclass-">第一步:引入项目下面生成的 fontclass 代码:</h3>
|
||||
<pre><code class="language-html"><link rel="stylesheet" href="./iconfont.css">
|
||||
</code></pre>
|
||||
<h3 id="-">第二步:挑选相应图标并获取类名,应用于页面:</h3>
|
||||
<pre><code class="language-html"><span class="iconfont el-icon-cjnxxx"></span>
|
||||
</code></pre>
|
||||
<blockquote>
|
||||
<p>"
|
||||
iconfont" 是你项目下的 font-family。可以通过编辑项目查看,默认是 "iconfont"。</p>
|
||||
</blockquote>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content symbol">
|
||||
<ul class="icon_lists dib-box">
|
||||
|
||||
<li class="dib">
|
||||
<svg class="icon svg-icon" aria-hidden="true">
|
||||
<use xlink:href="#el-icon-cjnshezhi"></use>
|
||||
</svg>
|
||||
<div class="name">设 置</div>
|
||||
<div class="code-name">#el-icon-cjnshezhi</div>
|
||||
</li>
|
||||
|
||||
<li class="dib">
|
||||
<svg class="icon svg-icon" aria-hidden="true">
|
||||
<use xlink:href="#el-icon-cjnmodule"></use>
|
||||
</svg>
|
||||
<div class="name">模块</div>
|
||||
<div class="code-name">#el-icon-cjnmodule</div>
|
||||
</li>
|
||||
|
||||
<li class="dib">
|
||||
<svg class="icon svg-icon" aria-hidden="true">
|
||||
<use xlink:href="#el-icon-cjnweixiu"></use>
|
||||
</svg>
|
||||
<div class="name">维修</div>
|
||||
<div class="code-name">#el-icon-cjnweixiu</div>
|
||||
</li>
|
||||
|
||||
<li class="dib">
|
||||
<svg class="icon svg-icon" aria-hidden="true">
|
||||
<use xlink:href="#el-icon-cjnwuliao"></use>
|
||||
</svg>
|
||||
<div class="name">物料</div>
|
||||
<div class="code-name">#el-icon-cjnwuliao</div>
|
||||
</li>
|
||||
|
||||
<li class="dib">
|
||||
<svg class="icon svg-icon" aria-hidden="true">
|
||||
<use xlink:href="#el-icon-cjna50gongyegongcheng_lingjian"></use>
|
||||
</svg>
|
||||
<div class="name">零件</div>
|
||||
<div class="code-name">#el-icon-cjna50gongyegongcheng_lingjian</div>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
<div class="article markdown">
|
||||
<h2 id="symbol-">Symbol 引用</h2>
|
||||
<hr>
|
||||
|
||||
<p>这是一种全新的使用方式,应该说这才是未来的主流,也是平台目前推荐的用法。相关介绍可以参考这篇<a href="">文章</a>
|
||||
这种用法其实是做了一个 SVG 的集合,与另外两种相比具有如下特点:</p>
|
||||
<ul>
|
||||
<li>支持多色图标了,不再受单色限制。</li>
|
||||
<li>通过一些技巧,支持像字体那样,通过 <code>font-size</code>, <code>color</code> 来调整样式。</li>
|
||||
<li>兼容性较差,支持 IE9+,及现代浏览器。</li>
|
||||
<li>浏览器渲染 SVG 的性能一般,还不如 png。</li>
|
||||
</ul>
|
||||
<p>使用步骤如下:</p>
|
||||
<h3 id="-symbol-">第一步:引入项目下面生成的 symbol 代码:</h3>
|
||||
<pre><code class="language-html"><script src="./iconfont.js"></script>
|
||||
</code></pre>
|
||||
<h3 id="-css-">第二步:加入通用 CSS 代码(引入一次就行):</h3>
|
||||
<pre><code class="language-html"><style>
|
||||
.icon {
|
||||
width: 1em;
|
||||
height: 1em;
|
||||
vertical-align: -0.15em;
|
||||
fill: currentColor;
|
||||
overflow: hidden;
|
||||
}
|
||||
</style>
|
||||
</code></pre>
|
||||
<h3 id="-">第三步:挑选相应图标并获取类名,应用于页面:</h3>
|
||||
<pre><code class="language-html"><svg class="icon" aria-hidden="true">
|
||||
<use xlink:href="#icon-xxx"></use>
|
||||
</svg>
|
||||
</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
$('.tab-container .content:first').show()
|
||||
|
||||
$('#tabs li').click(function (e) {
|
||||
var tabContent = $('.tab-container .content')
|
||||
var index = $(this).index()
|
||||
|
||||
if ($(this).hasClass('active')) {
|
||||
return
|
||||
} else {
|
||||
$('#tabs li').removeClass('active')
|
||||
$(this).addClass('active')
|
||||
|
||||
tabContent.hide().eq(index).fadeIn()
|
||||
}
|
||||
})
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
43
test/MES_Manage_View_V20/src/icon/iconfont.css
Normal file
@@ -0,0 +1,43 @@
|
||||
@font-face {
|
||||
font-family: "iconfont"; /* Project id 2669478 */
|
||||
src: url('iconfont.woff2?t=1626138435815') format('woff2'),
|
||||
url('iconfont.woff?t=1626138435815') format('woff'),
|
||||
url('iconfont.ttf?t=1626138435815') format('truetype');
|
||||
}
|
||||
|
||||
.iconfont {
|
||||
font-family: "iconfont" !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: "iconfont" !important;
|
||||
font-size: 16px;
|
||||
font-style: normal;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
.el-icon-cjnshezhi:before {
|
||||
content: "\e60b";
|
||||
}
|
||||
|
||||
.el-icon-cjnmodule:before {
|
||||
content: "\ec07";
|
||||
}
|
||||
|
||||
.el-icon-cjnweixiu:before {
|
||||
content: "\e63a";
|
||||
}
|
||||
|
||||
.el-icon-cjnwuliao:before {
|
||||
content: "\e6fb";
|
||||
}
|
||||
|
||||
.el-icon-cjna50gongyegongcheng_lingjian:before {
|
||||
content: "\e679";
|
||||
}
|
||||
|
||||
BIN
test/MES_Manage_View_V20/src/icon/iconfont.eot
Normal file
1
test/MES_Manage_View_V20/src/icon/iconfont.js
Normal file
44
test/MES_Manage_View_V20/src/icon/iconfont.json
Normal file
@@ -0,0 +1,44 @@
|
||||
{
|
||||
"id": "2669478",
|
||||
"name": "no name",
|
||||
"font_family": "iconfont",
|
||||
"css_prefix_text": "el-icon-cjn",
|
||||
"description": "",
|
||||
"glyphs": [
|
||||
{
|
||||
"icon_id": "18309270",
|
||||
"name": "设 置",
|
||||
"font_class": "shezhi",
|
||||
"unicode": "e60b",
|
||||
"unicode_decimal": 58891
|
||||
},
|
||||
{
|
||||
"icon_id": "19729470",
|
||||
"name": "模块",
|
||||
"font_class": "module",
|
||||
"unicode": "ec07",
|
||||
"unicode_decimal": 60423
|
||||
},
|
||||
{
|
||||
"icon_id": "339472",
|
||||
"name": "维修",
|
||||
"font_class": "weixiu",
|
||||
"unicode": "e63a",
|
||||
"unicode_decimal": 58938
|
||||
},
|
||||
{
|
||||
"icon_id": "18298023",
|
||||
"name": "物料",
|
||||
"font_class": "wuliao",
|
||||
"unicode": "e6fb",
|
||||
"unicode_decimal": 59131
|
||||
},
|
||||
{
|
||||
"icon_id": "20852728",
|
||||
"name": "零件",
|
||||
"font_class": "a50gongyegongcheng_lingjian",
|
||||
"unicode": "e679",
|
||||
"unicode_decimal": 59001
|
||||
}
|
||||
]
|
||||
}
|
||||
39
test/MES_Manage_View_V20/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
test/MES_Manage_View_V20/src/icon/iconfont.ttf
Normal file
BIN
test/MES_Manage_View_V20/src/icon/iconfont.woff
Normal file
BIN
test/MES_Manage_View_V20/src/icon/iconfont.woff2
Normal file
@@ -0,0 +1,2 @@
|
||||
<?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="1660036529247" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="8014" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css">@font-face { font-family: feedback-iconfont; src: url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.woff2?t=1630033759944") format("woff2"), url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.woff?t=1630033759944") format("woff"), url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.ttf?t=1630033759944") format("truetype"); }
|
||||
</style></defs><path d="M761.61061 291.378506c-9.413135 0-18.204364 3.626784-24.845082 10.262471L459.729123 578.861539 327.677545 446.738513c-6.641725-6.641725-15.432953-10.268509-24.845082-10.268509-9.34068 0-18.132915 3.626784-24.77464 10.268509-6.641725 6.642731-10.268509 15.432953-10.268509 24.77464 0 9.345712 3.626784 18.13694 10.268509 24.778665l156.898673 157.020438c6.641725 6.580339 15.432953 10.268509 24.773634 10.268509 9.35175 0 18.142978-3.68817 24.845082-10.268509l301.809033-302.054575c6.642731-6.576314 10.268509-15.366536 10.268509-24.77464 0-9.346718-3.626784-18.259712-10.268509-24.841057C779.742519 295.00529 770.951291 291.378506 761.61061 291.378506zM773.100794 94.579168l-2.027739 0c-109.742427 0-201.841011-12.483424-259.26476-78.142911-57.366389 65.659488-149.89266 78.142911-260.06378 78.142911C76.277191 94.579168 71.467978 270.042468 71.467978 270.042468c0 98.063054-0.061386 191.573508-0.061386 394.215551 0 113.735512 272.008821 321.109281 420.604332 356.400992 12.726954 3.008903 25.705488 3.008903 38.429422 0.061386 149.70649-35.048181 421.449642-241.31097 421.449642-356.401998L951.889989 270.103854C951.889989 142.22348 889.485952 94.579168 773.100794 94.579168zM888.935494 664.318399c0 65.293187-215.615546 247.458591-353.329697 289.998838-15.800261 4.859529-32.894652 4.859529-48.635539 0C349.131322 911.594845 134.362093 729.422397 134.362093 664.259026l-0.906696-267.93523 0.906696-124.248558c0.366301-11.684404 6.10133-114.54057 117.383429-114.54057 92.832193 0 186.958516-7.930823 260.06378-57.6069 73.039853 49.676076 167.166176 57.6069 261.291492 57.6069 88.778728 0 115.8347 26.3123 115.8347 112.569185L888.935494 664.318399z" p-id="8015"></path></svg>
|
||||
|
After Width: | Height: | Size: 2.3 KiB |
9
test/MES_Manage_View_V20/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)
|
||||