init
24
.babelrc
Normal file
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"presets": [
|
||||
["es2015", { "modules": false }],
|
||||
[
|
||||
"env", {
|
||||
"modules": false,
|
||||
"targets": {
|
||||
"browsers": ["> 1%", "last 2 versions", "not ie <= 8"]
|
||||
}
|
||||
}],
|
||||
"stage-2"
|
||||
],
|
||||
"plugins": [
|
||||
"transform-vue-jsx",
|
||||
"transform-runtime",
|
||||
[
|
||||
"component",
|
||||
{
|
||||
"libraryName": "element-ui",
|
||||
"styleLibraryName": "theme-chalk"
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
9
.editorconfig
Normal file
@@ -0,0 +1,9 @@
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
4
.eslintignore
Normal file
@@ -0,0 +1,4 @@
|
||||
/build/
|
||||
/config/
|
||||
/dist/
|
||||
/*.js
|
||||
29
.eslintrc.js
Normal file
@@ -0,0 +1,29 @@
|
||||
// https://eslint.org/docs/user-guide/configuring
|
||||
|
||||
module.exports = {
|
||||
root: true,
|
||||
parserOptions: {
|
||||
parser: 'babel-eslint'
|
||||
},
|
||||
env: {
|
||||
browser: true,
|
||||
},
|
||||
extends: [
|
||||
// https://github.com/vuejs/eslint-plugin-vue#priority-a-essential-error-prevention
|
||||
// consider switching to `plugin:vue/strongly-recommended` or `plugin:vue/recommended` for stricter rules.
|
||||
'plugin:vue/essential',
|
||||
// https://github.com/standard/standard/blob/master/docs/RULES-en.md
|
||||
'standard'
|
||||
],
|
||||
// required to lint *.vue files
|
||||
plugins: [
|
||||
'vue'
|
||||
],
|
||||
// add your custom rules here
|
||||
rules: {
|
||||
// allow async-await
|
||||
'generator-star-spacing': 'off',
|
||||
// allow debugger during development
|
||||
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off'
|
||||
}
|
||||
}
|
||||
14
.gitignore
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
.DS_Store
|
||||
node_modules/
|
||||
/dist/
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
|
||||
# Editor directories and files
|
||||
.idea
|
||||
.vscode
|
||||
*.suo
|
||||
*.ntvs*
|
||||
*.njsproj
|
||||
*.sln
|
||||
10
.postcssrc.js
Normal file
@@ -0,0 +1,10 @@
|
||||
// https://github.com/michael-ciniawsky/postcss-load-config
|
||||
|
||||
module.exports = {
|
||||
"plugins": {
|
||||
"postcss-import": {},
|
||||
"postcss-url": {},
|
||||
// to edit target browsers: use "browserslist" field in package.json
|
||||
"autoprefixer": {}
|
||||
}
|
||||
}
|
||||
26
README.md
Normal file
@@ -0,0 +1,26 @@
|
||||
# nl-screen-hl
|
||||
|
||||
> A Vue.js project
|
||||
|
||||
## Build Setup
|
||||
|
||||
``` bash
|
||||
# install dependencies
|
||||
npm install
|
||||
|
||||
# serve with hot reload at localhost:8080
|
||||
npm run dev
|
||||
|
||||
# build for production with minification
|
||||
npm run build
|
||||
|
||||
# build for production and view the bundle analyzer report
|
||||
npm run build --report
|
||||
```
|
||||
|
||||
For a detailed explanation on how things work, check out the [guide](http://vuejs-templates.github.io/webpack/) and [docs for vue-loader](http://vuejs.github.io/vue-loader).
|
||||
|
||||
# 注意事项
|
||||
+ 华弘大屏分辨率都为 1920 * 1200
|
||||
+ 看板分辨率为 1920 * 1080
|
||||
+ 接口文档地址:https://apifox.com/apidoc/shared-7fca569c-0233-402a-92da-74188764d4fc
|
||||
41
build/build.js
Normal file
@@ -0,0 +1,41 @@
|
||||
'use strict'
|
||||
require('./check-versions')()
|
||||
|
||||
process.env.NODE_ENV = 'production'
|
||||
|
||||
const ora = require('ora')
|
||||
const rm = require('rimraf')
|
||||
const path = require('path')
|
||||
const chalk = require('chalk')
|
||||
const webpack = require('webpack')
|
||||
const config = require('../config')
|
||||
const webpackConfig = require('./webpack.prod.conf')
|
||||
|
||||
const spinner = ora('building for production...')
|
||||
spinner.start()
|
||||
|
||||
rm(path.join(config.build.assetsRoot, config.build.assetsSubDirectory), err => {
|
||||
if (err) throw err
|
||||
webpack(webpackConfig, (err, stats) => {
|
||||
spinner.stop()
|
||||
if (err) throw err
|
||||
process.stdout.write(stats.toString({
|
||||
colors: true,
|
||||
modules: false,
|
||||
children: false, // If you are using ts-loader, setting this to true will make TypeScript errors show up during build.
|
||||
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'
|
||||
))
|
||||
})
|
||||
})
|
||||
54
build/check-versions.js
Normal file
@@ -0,0 +1,54 @@
|
||||
'use strict'
|
||||
const chalk = require('chalk')
|
||||
const semver = require('semver')
|
||||
const packageConfig = require('../package.json')
|
||||
const shell = require('shelljs')
|
||||
|
||||
function exec (cmd) {
|
||||
return require('child_process').execSync(cmd).toString().trim()
|
||||
}
|
||||
|
||||
const versionRequirements = [
|
||||
{
|
||||
name: 'node',
|
||||
currentVersion: semver.clean(process.version),
|
||||
versionRequirement: packageConfig.engines.node
|
||||
}
|
||||
]
|
||||
|
||||
if (shell.which('npm')) {
|
||||
versionRequirements.push({
|
||||
name: 'npm',
|
||||
currentVersion: exec('npm --version'),
|
||||
versionRequirement: packageConfig.engines.npm
|
||||
})
|
||||
}
|
||||
|
||||
module.exports = function () {
|
||||
const warnings = []
|
||||
|
||||
for (let i = 0; i < versionRequirements.length; i++) {
|
||||
const mod = versionRequirements[i]
|
||||
|
||||
if (!semver.satisfies(mod.currentVersion, mod.versionRequirement)) {
|
||||
warnings.push(mod.name + ': ' +
|
||||
chalk.red(mod.currentVersion) + ' should be ' +
|
||||
chalk.green(mod.versionRequirement)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
if (warnings.length) {
|
||||
console.log('')
|
||||
console.log(chalk.yellow('To use this template, you must update following to modules:'))
|
||||
console.log()
|
||||
|
||||
for (let i = 0; i < warnings.length; i++) {
|
||||
const warning = warnings[i]
|
||||
console.log(' ' + warning)
|
||||
}
|
||||
|
||||
console.log()
|
||||
process.exit(1)
|
||||
}
|
||||
}
|
||||
BIN
build/logo.png
Normal file
|
After Width: | Height: | Size: 6.7 KiB |
102
build/utils.js
Normal file
@@ -0,0 +1,102 @@
|
||||
'use strict'
|
||||
const path = require('path')
|
||||
const config = require('../config')
|
||||
const ExtractTextPlugin = require('extract-text-webpack-plugin')
|
||||
const packageConfig = require('../package.json')
|
||||
|
||||
exports.assetsPath = function (_path) {
|
||||
const assetsSubDirectory = process.env.NODE_ENV === 'production'
|
||||
? config.build.assetsSubDirectory
|
||||
: config.dev.assetsSubDirectory
|
||||
|
||||
return path.posix.join(assetsSubDirectory, _path)
|
||||
}
|
||||
|
||||
exports.cssLoaders = function (options) {
|
||||
options = options || {}
|
||||
|
||||
const cssLoader = {
|
||||
loader: 'css-loader',
|
||||
options: {
|
||||
sourceMap: options.sourceMap
|
||||
}
|
||||
}
|
||||
|
||||
const postcssLoader = {
|
||||
loader: 'postcss-loader',
|
||||
options: {
|
||||
sourceMap: options.sourceMap
|
||||
}
|
||||
}
|
||||
|
||||
// generate loader string to be used with extract text plugin
|
||||
function generateLoaders (loader, loaderOptions) {
|
||||
const loaders = options.usePostCSS ? [cssLoader, postcssLoader] : [cssLoader]
|
||||
|
||||
if (loader) {
|
||||
loaders.push({
|
||||
loader: loader + '-loader',
|
||||
options: Object.assign({}, loaderOptions, {
|
||||
sourceMap: options.sourceMap
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
// Extract CSS when that option is specified
|
||||
// (which is the case during production build)
|
||||
if (options.extract) {
|
||||
return ExtractTextPlugin.extract({
|
||||
use: loaders,
|
||||
publicPath: '../../',
|
||||
fallback: 'vue-style-loader'
|
||||
})
|
||||
} else {
|
||||
return ['vue-style-loader'].concat(loaders)
|
||||
}
|
||||
}
|
||||
|
||||
// https://vue-loader.vuejs.org/en/configurations/extract-css.html
|
||||
return {
|
||||
css: generateLoaders(),
|
||||
postcss: generateLoaders(),
|
||||
less: generateLoaders('less'),
|
||||
sass: generateLoaders('sass', { indentedSyntax: true }),
|
||||
scss: generateLoaders('sass'),
|
||||
stylus: generateLoaders('stylus'),
|
||||
styl: generateLoaders('stylus')
|
||||
}
|
||||
}
|
||||
|
||||
// Generate loaders for standalone style files (outside of .vue)
|
||||
exports.styleLoaders = function (options) {
|
||||
const output = []
|
||||
const loaders = exports.cssLoaders(options)
|
||||
|
||||
for (const extension in loaders) {
|
||||
const loader = loaders[extension]
|
||||
output.push({
|
||||
test: new RegExp('\\.' + extension + '$'),
|
||||
use: loader
|
||||
})
|
||||
}
|
||||
|
||||
return output
|
||||
}
|
||||
|
||||
exports.createNotifierCallback = () => {
|
||||
const notifier = require('node-notifier')
|
||||
|
||||
return (severity, errors) => {
|
||||
if (severity !== 'error') return
|
||||
|
||||
const error = errors[0]
|
||||
const filename = error.file && error.file.split('!').pop()
|
||||
|
||||
notifier.notify({
|
||||
title: packageConfig.name,
|
||||
message: severity + ': ' + error.name,
|
||||
subtitle: filename || '',
|
||||
icon: path.join(__dirname, 'logo.png')
|
||||
})
|
||||
}
|
||||
}
|
||||
22
build/vue-loader.conf.js
Normal file
@@ -0,0 +1,22 @@
|
||||
'use strict'
|
||||
const utils = require('./utils')
|
||||
const config = require('../config')
|
||||
const isProduction = process.env.NODE_ENV === 'production'
|
||||
const sourceMapEnabled = isProduction
|
||||
? config.build.productionSourceMap
|
||||
: config.dev.cssSourceMap
|
||||
|
||||
module.exports = {
|
||||
loaders: utils.cssLoaders({
|
||||
sourceMap: sourceMapEnabled,
|
||||
extract: isProduction
|
||||
}),
|
||||
cssSourceMap: sourceMapEnabled,
|
||||
cacheBusting: config.dev.cacheBusting,
|
||||
transformToRequire: {
|
||||
video: ['src', 'poster'],
|
||||
source: 'src',
|
||||
img: 'src',
|
||||
image: 'xlink:href'
|
||||
}
|
||||
}
|
||||
106
build/webpack.base.conf.js
Normal file
@@ -0,0 +1,106 @@
|
||||
'use strict'
|
||||
const path = require('path')
|
||||
const utils = require('./utils')
|
||||
const config = require('../config')
|
||||
const vueLoaderConfig = require('./vue-loader.conf')
|
||||
const webpack = require("webpack")
|
||||
|
||||
function resolve (dir) {
|
||||
return path.join(__dirname, '..', dir)
|
||||
}
|
||||
|
||||
const createLintingRule = () => ({
|
||||
test: /\.(js|vue)$/,
|
||||
loader: 'eslint-loader',
|
||||
enforce: 'pre',
|
||||
include: [resolve('src'), resolve('test')],
|
||||
options: {
|
||||
formatter: require('eslint-friendly-formatter'),
|
||||
emitWarning: !config.dev.showEslintErrorsInOverlay
|
||||
}
|
||||
})
|
||||
|
||||
module.exports = {
|
||||
context: path.resolve(__dirname, '../'),
|
||||
entry: {
|
||||
app: './src/main.js'
|
||||
},
|
||||
output: {
|
||||
path: config.build.assetsRoot,
|
||||
filename: '[name].js',
|
||||
publicPath: process.env.NODE_ENV === 'production'
|
||||
? config.build.assetsPublicPath
|
||||
: config.dev.assetsPublicPath
|
||||
},
|
||||
resolve: {
|
||||
extensions: ['.js', '.vue', '.json'],
|
||||
alias: {
|
||||
'vue$': 'vue/dist/vue.esm.js',
|
||||
'@': resolve('src'),
|
||||
'@components': resolve('src') + '/components',
|
||||
'@page': resolve('src') + '/pages',
|
||||
'@style': resolve('src') + '/style',
|
||||
'@img': resolve('src') + '/images',
|
||||
'@js': resolve('src') + '/config'
|
||||
}
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
...(config.dev.useEslint ? [createLintingRule()] : []),
|
||||
{
|
||||
test: /\.vue$/,
|
||||
loader: 'vue-loader',
|
||||
options: vueLoaderConfig
|
||||
},
|
||||
{
|
||||
test: /\.js$/,
|
||||
loader: 'babel-loader',
|
||||
include: [resolve('src'), resolve('test'), resolve('node_modules/webpack-dev-server/client')]
|
||||
},
|
||||
{
|
||||
test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
|
||||
loader: 'url-loader',
|
||||
options: {
|
||||
limit: 10000,
|
||||
name: utils.assetsPath('img/[name].[hash:7].[ext]')
|
||||
}
|
||||
},
|
||||
{
|
||||
test: /\.(mp4|webm|ogg|mp3|wav|flac|aac)(\?.*)?$/,
|
||||
loader: 'url-loader',
|
||||
options: {
|
||||
limit: 10000,
|
||||
name: utils.assetsPath('media/[name].[hash:7].[ext]')
|
||||
}
|
||||
},
|
||||
{
|
||||
test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
|
||||
loader: 'url-loader',
|
||||
options: {
|
||||
limit: 10000,
|
||||
name: utils.assetsPath('fonts/[name].[hash:7].[ext]')
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
node: {
|
||||
// prevent webpack from injecting useless setImmediate polyfill because Vue
|
||||
// source contains it (although only uses it if it's native).
|
||||
setImmediate: false,
|
||||
// prevent webpack from injecting mocks to Node native modules
|
||||
// that does not make sense for the client
|
||||
dgram: 'empty',
|
||||
fs: 'empty',
|
||||
net: 'empty',
|
||||
tls: 'empty',
|
||||
child_process: 'empty'
|
||||
},
|
||||
// add jquery peizhi
|
||||
plugins: [
|
||||
new webpack.optimize.CommonsChunkPlugin('common.js'),
|
||||
new webpack.ProvidePlugin({
|
||||
jQuery: "jquery",
|
||||
$: "jquery"
|
||||
})
|
||||
]
|
||||
}
|
||||
95
build/webpack.dev.conf.js
Normal file
@@ -0,0 +1,95 @@
|
||||
'use strict'
|
||||
const utils = require('./utils')
|
||||
const webpack = require('webpack')
|
||||
const config = require('../config')
|
||||
const merge = require('webpack-merge')
|
||||
const path = require('path')
|
||||
const baseWebpackConfig = require('./webpack.base.conf')
|
||||
const CopyWebpackPlugin = require('copy-webpack-plugin')
|
||||
const HtmlWebpackPlugin = require('html-webpack-plugin')
|
||||
const FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin')
|
||||
const portfinder = require('portfinder')
|
||||
|
||||
const HOST = process.env.HOST
|
||||
const PORT = process.env.PORT && Number(process.env.PORT)
|
||||
|
||||
const devWebpackConfig = merge(baseWebpackConfig, {
|
||||
module: {
|
||||
rules: utils.styleLoaders({ sourceMap: config.dev.cssSourceMap, usePostCSS: true })
|
||||
},
|
||||
// cheap-module-eval-source-map is faster for development
|
||||
devtool: config.dev.devtool,
|
||||
|
||||
// these devServer options should be customized in /config/index.js
|
||||
devServer: {
|
||||
clientLogLevel: 'warning',
|
||||
historyApiFallback: {
|
||||
rewrites: [
|
||||
{ from: /.*/, to: path.posix.join(config.dev.assetsPublicPath, 'index.html') },
|
||||
],
|
||||
},
|
||||
hot: true,
|
||||
contentBase: false, // since we use CopyWebpackPlugin.
|
||||
compress: true,
|
||||
host: HOST || config.dev.host,
|
||||
port: PORT || config.dev.port,
|
||||
open: config.dev.autoOpenBrowser,
|
||||
overlay: config.dev.errorOverlay
|
||||
? { warnings: false, errors: true }
|
||||
: false,
|
||||
publicPath: config.dev.assetsPublicPath,
|
||||
proxy: config.dev.proxyTable,
|
||||
quiet: true, // necessary for FriendlyErrorsPlugin
|
||||
watchOptions: {
|
||||
poll: config.dev.poll,
|
||||
}
|
||||
},
|
||||
plugins: [
|
||||
new webpack.DefinePlugin({
|
||||
'process.env': require('../config/dev.env')
|
||||
}),
|
||||
new webpack.HotModuleReplacementPlugin(),
|
||||
new webpack.NamedModulesPlugin(), // HMR shows correct file names in console on update.
|
||||
new webpack.NoEmitOnErrorsPlugin(),
|
||||
// https://github.com/ampedandwired/html-webpack-plugin
|
||||
new HtmlWebpackPlugin({
|
||||
filename: 'index.html',
|
||||
template: 'index.html',
|
||||
inject: true
|
||||
}),
|
||||
// copy custom static assets
|
||||
new CopyWebpackPlugin([
|
||||
{
|
||||
from: path.resolve(__dirname, '../static'),
|
||||
to: config.dev.assetsSubDirectory,
|
||||
ignore: ['.*']
|
||||
}
|
||||
])
|
||||
]
|
||||
})
|
||||
|
||||
module.exports = new Promise((resolve, reject) => {
|
||||
portfinder.basePort = process.env.PORT || config.dev.port
|
||||
portfinder.getPort((err, port) => {
|
||||
if (err) {
|
||||
reject(err)
|
||||
} else {
|
||||
// publish the new Port, necessary for e2e tests
|
||||
process.env.PORT = port
|
||||
// add port to devServer config
|
||||
devWebpackConfig.devServer.port = port
|
||||
|
||||
// Add FriendlyErrorsPlugin
|
||||
devWebpackConfig.plugins.push(new FriendlyErrorsPlugin({
|
||||
compilationSuccessInfo: {
|
||||
messages: [`Your application is running here: http://${devWebpackConfig.devServer.host}:${port}`],
|
||||
},
|
||||
onErrors: config.dev.notifyOnErrors
|
||||
? utils.createNotifierCallback()
|
||||
: undefined
|
||||
}))
|
||||
|
||||
resolve(devWebpackConfig)
|
||||
}
|
||||
})
|
||||
})
|
||||
145
build/webpack.prod.conf.js
Normal file
@@ -0,0 +1,145 @@
|
||||
'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 ExtractTextPlugin = require('extract-text-webpack-plugin')
|
||||
const OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin')
|
||||
const UglifyJsPlugin = require('uglifyjs-webpack-plugin')
|
||||
|
||||
const env = require('../config/prod.env')
|
||||
|
||||
const webpackConfig = merge(baseWebpackConfig, {
|
||||
module: {
|
||||
rules: utils.styleLoaders({
|
||||
sourceMap: config.build.productionSourceMap,
|
||||
extract: true,
|
||||
usePostCSS: true
|
||||
})
|
||||
},
|
||||
devtool: config.build.productionSourceMap ? config.build.devtool : false,
|
||||
output: {
|
||||
path: config.build.assetsRoot,
|
||||
filename: utils.assetsPath('js/[name].[chunkhash].js'),
|
||||
chunkFilename: utils.assetsPath('js/[id].[chunkhash].js')
|
||||
},
|
||||
plugins: [
|
||||
// http://vuejs.github.io/vue-loader/en/workflow/production.html
|
||||
new webpack.DefinePlugin({
|
||||
'process.env': env
|
||||
}),
|
||||
new UglifyJsPlugin({
|
||||
uglifyOptions: {
|
||||
compress: {
|
||||
warnings: false
|
||||
}
|
||||
},
|
||||
sourceMap: config.build.productionSourceMap,
|
||||
parallel: true
|
||||
}),
|
||||
// extract css into its own file
|
||||
new ExtractTextPlugin({
|
||||
filename: utils.assetsPath('css/[name].[contenthash].css'),
|
||||
// Setting the following option to `false` will not extract CSS from codesplit chunks.
|
||||
// Their CSS will instead be inserted dynamically with style-loader when the codesplit chunk has been loaded by webpack.
|
||||
// It's currently set to `true` because we are seeing that sourcemaps are included in the codesplit bundle as well when it's `false`,
|
||||
// increasing file size: https://github.com/vuejs-templates/webpack/issues/1110
|
||||
allChunks: true,
|
||||
}),
|
||||
// Compress extracted CSS. We are using this plugin so that possible
|
||||
// duplicated CSS from different components can be deduped.
|
||||
new OptimizeCSSPlugin({
|
||||
cssProcessorOptions: config.build.productionSourceMap
|
||||
? { safe: true, map: { inline: false } }
|
||||
: { safe: true }
|
||||
}),
|
||||
// generate dist index.html with correct asset hash for caching.
|
||||
// you can customize output by editing /index.html
|
||||
// see https://github.com/ampedandwired/html-webpack-plugin
|
||||
new HtmlWebpackPlugin({
|
||||
filename: config.build.index,
|
||||
template: 'index.html',
|
||||
inject: true,
|
||||
minify: {
|
||||
removeComments: true,
|
||||
collapseWhitespace: true,
|
||||
removeAttributeQuotes: true
|
||||
// more options:
|
||||
// https://github.com/kangax/html-minifier#options-quick-reference
|
||||
},
|
||||
// necessary to consistently work with multiple chunks via CommonsChunkPlugin
|
||||
chunksSortMode: 'dependency'
|
||||
}),
|
||||
// keep module.id stable when vendor modules does not change
|
||||
new webpack.HashedModuleIdsPlugin(),
|
||||
// enable scope hoisting
|
||||
new webpack.optimize.ModuleConcatenationPlugin(),
|
||||
// split vendor js into its own file
|
||||
new webpack.optimize.CommonsChunkPlugin({
|
||||
name: 'vendor',
|
||||
minChunks (module) {
|
||||
// any required modules inside node_modules are extracted to vendor
|
||||
return (
|
||||
module.resource &&
|
||||
/\.js$/.test(module.resource) &&
|
||||
module.resource.indexOf(
|
||||
path.join(__dirname, '../node_modules')
|
||||
) === 0
|
||||
)
|
||||
}
|
||||
}),
|
||||
// extract webpack runtime and module manifest to its own file in order to
|
||||
// prevent vendor hash from being updated whenever app bundle is updated
|
||||
new webpack.optimize.CommonsChunkPlugin({
|
||||
name: 'manifest',
|
||||
minChunks: Infinity
|
||||
}),
|
||||
// This instance extracts shared chunks from code splitted chunks and bundles them
|
||||
// in a separate chunk, similar to the vendor chunk
|
||||
// see: https://webpack.js.org/plugins/commons-chunk-plugin/#extra-async-commons-chunk
|
||||
new webpack.optimize.CommonsChunkPlugin({
|
||||
name: 'app',
|
||||
async: 'vendor-async',
|
||||
children: true,
|
||||
minChunks: 3
|
||||
}),
|
||||
|
||||
// copy custom static assets
|
||||
new CopyWebpackPlugin([
|
||||
{
|
||||
from: path.resolve(__dirname, '../static'),
|
||||
to: config.build.assetsSubDirectory,
|
||||
ignore: ['.*']
|
||||
}
|
||||
])
|
||||
]
|
||||
})
|
||||
|
||||
if (config.build.productionGzip) {
|
||||
const CompressionWebpackPlugin = require('compression-webpack-plugin')
|
||||
|
||||
webpackConfig.plugins.push(
|
||||
new CompressionWebpackPlugin({
|
||||
asset: '[path].gz[query]',
|
||||
algorithm: 'gzip',
|
||||
test: new RegExp(
|
||||
'\\.(' +
|
||||
config.build.productionGzipExtensions.join('|') +
|
||||
')$'
|
||||
),
|
||||
threshold: 10240,
|
||||
minRatio: 0.8
|
||||
})
|
||||
)
|
||||
}
|
||||
|
||||
if (config.build.bundleAnalyzerReport) {
|
||||
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin
|
||||
webpackConfig.plugins.push(new BundleAnalyzerPlugin())
|
||||
}
|
||||
|
||||
module.exports = webpackConfig
|
||||
7
config/dev.env.js
Normal file
@@ -0,0 +1,7 @@
|
||||
'use strict'
|
||||
const merge = require('webpack-merge')
|
||||
const prodEnv = require('./prod.env')
|
||||
|
||||
module.exports = merge(prodEnv, {
|
||||
NODE_ENV: '"development"'
|
||||
})
|
||||
76
config/index.js
Normal file
@@ -0,0 +1,76 @@
|
||||
'use strict'
|
||||
// Template version: 1.3.1
|
||||
// see http://vuejs-templates.github.io/webpack for documentation.
|
||||
|
||||
const path = require('path')
|
||||
|
||||
module.exports = {
|
||||
dev: {
|
||||
|
||||
// Paths
|
||||
assetsSubDirectory: 'static',
|
||||
assetsPublicPath: '/',
|
||||
proxyTable: {},
|
||||
|
||||
// Various Dev Server settings
|
||||
host: '0.0.0.0', // can be overwritten by process.env.HOST
|
||||
port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
|
||||
autoOpenBrowser: true,
|
||||
errorOverlay: true,
|
||||
notifyOnErrors: true,
|
||||
poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions-
|
||||
|
||||
// Use Eslint Loader?
|
||||
// If true, your code will be linted during bundling and
|
||||
// linting errors and warnings will be shown in the console.
|
||||
useEslint: true,
|
||||
// If true, eslint errors and warnings will also be shown in the error overlay
|
||||
// in the browser.
|
||||
showEslintErrorsInOverlay: false,
|
||||
|
||||
/**
|
||||
* Source Maps
|
||||
*/
|
||||
|
||||
// https://webpack.js.org/configuration/devtool/#development
|
||||
devtool: 'cheap-module-eval-source-map',
|
||||
|
||||
// If you have problems debugging vue-files in devtools,
|
||||
// set this to false - it *may* help
|
||||
// https://vue-loader.vuejs.org/en/options.html#cachebusting
|
||||
cacheBusting: true,
|
||||
|
||||
cssSourceMap: true
|
||||
},
|
||||
|
||||
build: {
|
||||
// Template for index.html
|
||||
index: path.resolve(__dirname, '../dist/index.html'),
|
||||
|
||||
// Paths
|
||||
assetsRoot: path.resolve(__dirname, '../dist'),
|
||||
assetsSubDirectory: 'static',
|
||||
assetsPublicPath: './',
|
||||
|
||||
/**
|
||||
* Source Maps
|
||||
*/
|
||||
|
||||
productionSourceMap: true,
|
||||
// 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
|
||||
}
|
||||
}
|
||||
4
config/prod.env.js
Normal file
@@ -0,0 +1,4 @@
|
||||
'use strict'
|
||||
module.exports = {
|
||||
NODE_ENV: '"production"'
|
||||
}
|
||||
11
index.html
Normal file
@@ -0,0 +1,11 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0, minimum-scale=1.0,user-scalable=no">
|
||||
<title>宁德华弘大屏监控</title>
|
||||
</head>
|
||||
<body class="clearfix">
|
||||
<div id="app"></div>
|
||||
</body>
|
||||
</html>
|
||||
12049
package-lock.json
generated
Normal file
89
package.json
Normal file
@@ -0,0 +1,89 @@
|
||||
{
|
||||
"name": "screen-lnsh-new",
|
||||
"version": "1.0.0",
|
||||
"description": "A Vue.js project",
|
||||
"author": "cll",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js",
|
||||
"start": "npm run dev",
|
||||
"lint": "eslint --ext .js,.vue src",
|
||||
"build": "node build/build.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"add": "^2.0.6",
|
||||
"axios": "^0.18.0",
|
||||
"babel-plugin-component": "^1.1.1",
|
||||
"babel-polyfill": "^6.26.0",
|
||||
"babel-preset-es2015": "^6.24.1",
|
||||
"default-passive-events": "^2.0.0",
|
||||
"echarts": "^5.1.1",
|
||||
"element-ui": "^2.15.14",
|
||||
"stylus": "^0.54.5",
|
||||
"stylus-loader": "^3.0.2",
|
||||
"vue": "^2.5.2",
|
||||
"vue-particles": "^1.0.9",
|
||||
"vue-router": "^3.0.1",
|
||||
"vue-seamless-scroll": "^1.1.16",
|
||||
"vuex": "^3.0.1",
|
||||
"yarn": "^1.22.21"
|
||||
},
|
||||
"devDependencies": {
|
||||
"autoprefixer": "^7.1.2",
|
||||
"babel-core": "^6.22.1",
|
||||
"babel-eslint": "^8.2.1",
|
||||
"babel-helper-vue-jsx-merge-props": "^2.0.3",
|
||||
"babel-loader": "^7.1.1",
|
||||
"babel-plugin-import": "^1.9.1",
|
||||
"babel-plugin-syntax-jsx": "^6.18.0",
|
||||
"babel-plugin-transform-runtime": "^6.22.0",
|
||||
"babel-plugin-transform-vue-jsx": "^3.5.0",
|
||||
"babel-preset-env": "^1.3.2",
|
||||
"babel-preset-stage-2": "^6.22.0",
|
||||
"chalk": "^2.0.1",
|
||||
"copy-webpack-plugin": "^4.0.1",
|
||||
"css-loader": "^0.28.0",
|
||||
"eslint": "^4.15.0",
|
||||
"eslint-config-standard": "^10.2.1",
|
||||
"eslint-friendly-formatter": "^3.0.0",
|
||||
"eslint-loader": "^1.7.1",
|
||||
"eslint-plugin-import": "^2.7.0",
|
||||
"eslint-plugin-node": "^5.2.0",
|
||||
"eslint-plugin-promise": "^3.4.0",
|
||||
"eslint-plugin-standard": "^3.0.1",
|
||||
"eslint-plugin-vue": "^4.0.0",
|
||||
"extract-text-webpack-plugin": "^3.0.0",
|
||||
"file-loader": "^1.1.4",
|
||||
"friendly-errors-webpack-plugin": "^1.6.1",
|
||||
"html-webpack-plugin": "^2.30.1",
|
||||
"node-notifier": "^5.1.2",
|
||||
"optimize-css-assets-webpack-plugin": "^3.2.0",
|
||||
"ora": "^1.2.0",
|
||||
"portfinder": "^1.0.13",
|
||||
"postcss-import": "^11.0.0",
|
||||
"postcss-loader": "^2.0.8",
|
||||
"postcss-url": "^7.2.1",
|
||||
"rimraf": "^2.6.0",
|
||||
"semver": "^5.3.0",
|
||||
"shelljs": "^0.7.6",
|
||||
"uglifyjs-webpack-plugin": "^1.1.1",
|
||||
"url-loader": "^0.5.8",
|
||||
"vconsole": "^3.2.0",
|
||||
"vue-loader": "^13.3.0",
|
||||
"vue-style-loader": "^3.0.1",
|
||||
"vue-template-compiler": "^2.5.2",
|
||||
"webpack": "^3.6.0",
|
||||
"webpack-bundle-analyzer": "^2.9.0",
|
||||
"webpack-dev-server": "^2.9.1",
|
||||
"webpack-merge": "^4.1.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 6.0.0",
|
||||
"npm": ">= 3.0.0"
|
||||
},
|
||||
"browserslist": [
|
||||
"> 1%",
|
||||
"last 2 versions",
|
||||
"not ie <= 8"
|
||||
]
|
||||
}
|
||||
20
src/App.vue
Normal file
@@ -0,0 +1,20 @@
|
||||
<template>
|
||||
<div id="app">
|
||||
<router-view/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'App',
|
||||
data () {
|
||||
return {}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
#app
|
||||
width 100%
|
||||
height 100%
|
||||
</style>
|
||||
75
src/components/header.vue
Normal file
@@ -0,0 +1,75 @@
|
||||
<template>
|
||||
<header>
|
||||
<div class="center_text">晟华大屏监控</div>
|
||||
<div class="tag_block">
|
||||
<div class="tag_left">
|
||||
<!-- <div v-if="index == '0'" class="tag cur_tag">首页</div>
|
||||
<router-link v-else to="/homepage" class="tag">首页</router-link> -->
|
||||
<div v-if="index == '1'" class="tag cur_tag">生产统计</div>
|
||||
<router-link v-else to="/prodcount" class="tag">生产统计</router-link>
|
||||
</div>
|
||||
<div class="tag_right">
|
||||
<div v-if="index == '2'" class="tag cur_tag">仓储监控</div>
|
||||
<router-link v-else to="/storagemonitor" class="tag">仓储监控</router-link>
|
||||
<div v-if="index == '3'" class="tag cur_tag">设备监控</div>
|
||||
<router-link v-else to="/devicemonitor" class="tag">设备监控</router-link>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'Header',
|
||||
data () {
|
||||
return {}
|
||||
},
|
||||
props: {
|
||||
index: String
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
@import '~@style/mixin'
|
||||
header
|
||||
_wh(100%, 84px)
|
||||
overflow hidden
|
||||
position relative
|
||||
_bis('../assets/images/top.png',auto, 84px)
|
||||
.center_text
|
||||
_wh(400px, 40px)
|
||||
position absolute
|
||||
_font(36px, 40px, #fff,,center)
|
||||
font-family "阿里妈妈数黑体" !important
|
||||
left 50%
|
||||
top 8px
|
||||
margin-left -200px
|
||||
letter-spacing 6px
|
||||
.tag_block
|
||||
_wh(100%, 100%)
|
||||
_fj(row)
|
||||
padding 25px 15px 0
|
||||
.tag_left
|
||||
_wh(50%, 100%)
|
||||
_fj(row, flex-start)
|
||||
.tag
|
||||
margin-right 20px
|
||||
.tag_right
|
||||
_wh(50%, 100%)
|
||||
_fj(row, flex-end)
|
||||
.tag
|
||||
margin-left 20px
|
||||
.tag
|
||||
display inline-block
|
||||
_wh(132px, 36px)
|
||||
_font(16px, 36px)
|
||||
_bis('../assets/images/tag_1.png')
|
||||
cursor pointer
|
||||
&:hover
|
||||
color #32C5FF
|
||||
_bis('../assets/images/tag_2.png')
|
||||
.cur_tag
|
||||
color #32C5FF
|
||||
_bis('../assets/images/tag_2.png')
|
||||
</style>
|
||||
143
src/components/header3.vue
Normal file
@@ -0,0 +1,143 @@
|
||||
<template>
|
||||
<header>
|
||||
<div class="exit_btn" :style="expand ? {opacity: 1} : {opacity: 0.1}">
|
||||
<div class="exit_txt" @click="$router.push('/setup')" :style="expand ? {width: '70px'} : {width: '0px'}">退出</div>
|
||||
<div class="exit_arrow" v-text="!expand ? '>>' : '<<'" @click.stop="expand = !expand"></div>
|
||||
</div>
|
||||
<p>{{title}}</p>
|
||||
<div class="data_box clearfix">
|
||||
<div class="date_item date">{{date}}</div>
|
||||
<div class="date_item week">{{week}}</div>
|
||||
<div class="date_item time clearfix">
|
||||
<div class="tiem_item hours">{{hours}}</div>
|
||||
<div class="colon">:</div>
|
||||
<div class="tiem_item minutes">{{minutes}}</div>
|
||||
<div class="colon">:</div>
|
||||
<div class="tiem_item seconds">{{seconds}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<slot></slot>
|
||||
</header>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'Header',
|
||||
data () {
|
||||
return {
|
||||
expand: false,
|
||||
timer: null,
|
||||
time: '',
|
||||
hours: '',
|
||||
minutes: '',
|
||||
seconds: '',
|
||||
date: '',
|
||||
week: ''
|
||||
}
|
||||
},
|
||||
props: {
|
||||
title: String
|
||||
},
|
||||
created () {
|
||||
this.updateTime()
|
||||
this.timer = window.setInterval(this.updateTime, 1000)
|
||||
},
|
||||
beforeDestroy () {
|
||||
this.$once('hook:beforeDestroy', () => {
|
||||
clearInterval(this.timer)
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
expandTooltip () {
|
||||
this.expand = !this.expand
|
||||
},
|
||||
updateTime () {
|
||||
let cd = new Date()
|
||||
let year = cd.getFullYear()
|
||||
let month = cd.getMonth() + 1 < 10 ? '0' + (cd.getMonth() + 1) : cd.getMonth() + 1
|
||||
let date = cd.getDate() < 10 ? '0' + cd.getDate() : cd.getDate()
|
||||
let hh = cd.getHours() < 10 ? '0' + cd.getHours() : cd.getHours()
|
||||
let mm = cd.getMinutes() < 10 ? '0' + cd.getMinutes() : cd.getMinutes()
|
||||
let ss = cd.getSeconds() < 10 ? '0' + cd.getSeconds() : cd.getSeconds()
|
||||
var weekday = ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六']
|
||||
let myddy = new Date().getDay()
|
||||
let week = weekday[myddy]
|
||||
this.time = `${hh}:${mm}:${ss}`
|
||||
this.hours = `${hh}`
|
||||
this.minutes = `${mm}`
|
||||
this.seconds = `${ss}`
|
||||
this.date = `${year}年${month}月${date}日`
|
||||
this.week = `${week}`
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
header
|
||||
position relative
|
||||
width 100%
|
||||
height 8%
|
||||
position relative
|
||||
background center center / 100% 100% url(../images/screen1/header.png) no-repeat
|
||||
p
|
||||
// font-family "PangMenZhengDao"
|
||||
font-family "YouSheBiaoTiHei"
|
||||
font-size 50px
|
||||
line-height 100px
|
||||
color #fff
|
||||
font-weight lighter
|
||||
text-align center
|
||||
letter-spacing 5px
|
||||
text-shadow 0 8px 8px rgba(0,0,0,0.30)
|
||||
.data_box
|
||||
position absolute
|
||||
right 0
|
||||
top 14px
|
||||
height 37px
|
||||
.date, .week
|
||||
padding-right 20px
|
||||
.time
|
||||
width 170px
|
||||
text-align center
|
||||
.date_item
|
||||
float left
|
||||
font-size 20px
|
||||
line-height 37px
|
||||
color #fff
|
||||
.tiem_item
|
||||
float left
|
||||
font-size 32px
|
||||
line-height 37px
|
||||
color #fff
|
||||
.colon
|
||||
float left
|
||||
font-size 32px
|
||||
line-height 37px
|
||||
color #fff
|
||||
.exit_btn
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 30px;
|
||||
height 50px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
.exit_txt
|
||||
font-size: 20px;
|
||||
line-height: 50px;
|
||||
color: #e6e7e1;
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
transition width .3s ease
|
||||
overflow hidden
|
||||
background-color: rgba(30, 182, 203, 80%);
|
||||
.exit_arrow
|
||||
width: 46px;
|
||||
font-size: 20px;
|
||||
line-height: 50px;
|
||||
color: #e6e7e1;
|
||||
text-align: center;
|
||||
background-color: rgba(30, 182, 203, 60%);
|
||||
border-top-right-radius: 30px;
|
||||
border-bottom-right-radius: 30px
|
||||
</style>
|
||||
97
src/components/select.vue
Normal file
@@ -0,0 +1,97 @@
|
||||
<template>
|
||||
<div class="select">
|
||||
<div class="select-item pointer" @click="selectOption">
|
||||
<div class="select-item-txt">{{defaultLabel}}</div>
|
||||
<div class="select-item-button"> </div>
|
||||
</div>
|
||||
<ul v-show="active" class="options">
|
||||
<li class="pointer" :class="{'li-active': e.index === index}" v-for="e in option" :key="e.index" @click="change(e)">{{e.label}}</li>
|
||||
</ul>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'SelectOpt',
|
||||
props: {
|
||||
option: Array,
|
||||
index: [Number, String]
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
active: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
defaultLabel () {
|
||||
let val = ''
|
||||
this.option.map(e => {
|
||||
if (e.index === this.index) {
|
||||
val = e.label
|
||||
}
|
||||
})
|
||||
return val
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
selectOption () {
|
||||
this.active = true
|
||||
},
|
||||
change (e) {
|
||||
this.$emit('change', e.index)
|
||||
this.active = false
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
@import '~@style/mixin'
|
||||
.select
|
||||
position relative
|
||||
_wh(100%, inherit)
|
||||
background-color #fff
|
||||
user-select none
|
||||
.select-item
|
||||
width 100%
|
||||
_fj(row)
|
||||
.select-item-txt
|
||||
width calc(100% - 50px)
|
||||
_font(15px, inherit, #999,,left)
|
||||
// padding 0 10px
|
||||
.select-item-button
|
||||
position relative
|
||||
_wh(50px, inherit)
|
||||
vertical-align top
|
||||
&::before
|
||||
content ''
|
||||
width 0
|
||||
height 0
|
||||
border-left 5px solid transparent
|
||||
border-right 5px solid transparent
|
||||
border-top 5px solid #999
|
||||
position absolute
|
||||
right 13px
|
||||
top 17px
|
||||
pointer-events none
|
||||
z-index 3
|
||||
.options
|
||||
position absolute
|
||||
z-index 100000
|
||||
top 44px
|
||||
width 100%
|
||||
padding 10px 0
|
||||
background-color #fff
|
||||
border 1px solid #eee
|
||||
border-radius 5px
|
||||
li
|
||||
width 100%
|
||||
_font(15px, 38px, #999,,left)
|
||||
padding 0 10px
|
||||
user-select none
|
||||
box-sizing border-box
|
||||
&:hover
|
||||
background-color #f5f7fa
|
||||
.li-active
|
||||
color #409eff
|
||||
</style>
|
||||
74
src/components/time.vue
Normal file
@@ -0,0 +1,74 @@
|
||||
<template>
|
||||
<div class="data_box">
|
||||
<div class="time">{{time}}</div>
|
||||
<div class="date_item">
|
||||
<div class="year">{{year}}</div>
|
||||
<div class="year">{{ date }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'Time',
|
||||
data () {
|
||||
return {
|
||||
timer: null,
|
||||
time: '',
|
||||
year: '',
|
||||
date: '',
|
||||
week: ''
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
this.timer = window.setInterval(this.updateTime, 1000)
|
||||
},
|
||||
methods: {
|
||||
updateTime () {
|
||||
let cd = new Date()
|
||||
let year = cd.getFullYear()
|
||||
let month = cd.getMonth() + 1 < 10 ? '0' + (cd.getMonth() + 1) : cd.getMonth() + 1
|
||||
let date = cd.getDate() < 10 ? '0' + cd.getDate() : cd.getDate()
|
||||
let hh = cd.getHours() < 10 ? '0' + cd.getHours() : cd.getHours()
|
||||
let mm = cd.getMinutes() < 10 ? '0' + cd.getMinutes() : cd.getMinutes()
|
||||
let ss = cd.getSeconds() < 10 ? '0' + cd.getSeconds() : cd.getSeconds()
|
||||
var weekday = ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六']
|
||||
let myddy = new Date().getDay()
|
||||
let week = weekday[myddy]
|
||||
this.time = `${hh}:${mm}:${ss}`
|
||||
this.year = `${year}`
|
||||
this.date = `${month}.${date}`
|
||||
this.week = `${week}`
|
||||
}
|
||||
},
|
||||
beforeDestroy () {
|
||||
this.$once('hook:beforeDestroy', () => {
|
||||
clearInterval(this.timer)
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
.data_box
|
||||
position absolute
|
||||
right 15px
|
||||
top 30px
|
||||
width 300px
|
||||
height 39px
|
||||
display: flex
|
||||
justify-content: flex-end
|
||||
.time
|
||||
font-size: 39px;
|
||||
line-height: 29px;
|
||||
font-family: 'YouSheBiaoTiHei';
|
||||
color: #AECAF5;
|
||||
.date_item
|
||||
margin-left 10px
|
||||
.year
|
||||
font-size: 16px;
|
||||
font-family: 'YouSheBiaoTiHei';
|
||||
color: #AECAF5;
|
||||
line-height: 16px;
|
||||
opacity: 0.7;
|
||||
</style>
|
||||
14
src/config/filter.js
Normal file
@@ -0,0 +1,14 @@
|
||||
// import store from '../vuex/store'
|
||||
|
||||
const filter = {
|
||||
numeric (value) {
|
||||
if (value === '') return ''
|
||||
return Number(value).toFixed(3)
|
||||
},
|
||||
numFixed (value, bit) {
|
||||
if (value === '') return ''
|
||||
return Number(value).toFixed(bit)
|
||||
}
|
||||
}
|
||||
|
||||
export default filter
|
||||
7
src/config/getData1.js
Normal file
@@ -0,0 +1,7 @@
|
||||
import {post} from '@js/http.js'
|
||||
|
||||
/** 压制看板 */
|
||||
export const cockpitpress = (id) => post('api/cockpit/press', {})
|
||||
|
||||
/** 分拣作业监控 */
|
||||
export const cockpitsorting = (id) => post('api/cockpit/sorting', {})
|
||||
9
src/config/getData2.js
Normal file
@@ -0,0 +1,9 @@
|
||||
import {post} from './http.js'
|
||||
// 大屏-中间设备运行情况
|
||||
export const deviceCondition = () => post('api/cockpit/deviceCondition', {})
|
||||
// 出、入窑输送线弹窗
|
||||
export const inOutKilnDetail = () => post('api/cockpit/inOutKilnDetail', {})
|
||||
// 窑弹出框
|
||||
export const kilnDetail = () => post('api/cockpit/kilnDetail', {})
|
||||
// 大屏-两侧图表
|
||||
export const screenTableData = () => post('api/cockpit/screenTableData', {})
|
||||
65
src/config/http.js
Normal file
@@ -0,0 +1,65 @@
|
||||
import axios from 'axios'
|
||||
import { Dialog } from './mUtils.js'
|
||||
import store from '../vuex/store.js'
|
||||
import router from '@/router'
|
||||
|
||||
axios.defaults.timeout = 50000
|
||||
axios.defaults.headers.post['Content-Type'] = 'application/json;charset=UTF-8'
|
||||
|
||||
axios.interceptors.request.use(
|
||||
config => {
|
||||
// let token = ''
|
||||
// if (store.getters.userInfo !== '') {
|
||||
// token = JSON.parse(store.getters.userInfo).token
|
||||
// }
|
||||
// token && (config.headers.Authorization = token)
|
||||
if (config.method === 'post') {
|
||||
if (!config.data.flag) {
|
||||
config.data = config.data
|
||||
} else {
|
||||
config.data = config.data.formData
|
||||
}
|
||||
}
|
||||
return config
|
||||
},
|
||||
error => {
|
||||
Dialog('错误的传参')
|
||||
return Promise.reject(error)
|
||||
}
|
||||
)
|
||||
|
||||
axios.interceptors.response.use(
|
||||
response => {
|
||||
return Promise.resolve(response)
|
||||
},
|
||||
error => {
|
||||
if (error && error.response) {
|
||||
switch (error.response.status) {
|
||||
case 400:
|
||||
break
|
||||
case 401:
|
||||
// store.dispatch('setSignOut')
|
||||
router.push('/setup')
|
||||
break
|
||||
}
|
||||
return Promise.reject(error.response.data)
|
||||
} else {
|
||||
return Promise.reject(error)
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
export const post = (sevmethod, params) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
axios.post(`${store.getters.baseUrl}/` + sevmethod, params)
|
||||
.then(response => {
|
||||
resolve(response.data)
|
||||
}, error => {
|
||||
// Dialog(error.message)
|
||||
reject(error.message)
|
||||
})
|
||||
.catch((error) => {
|
||||
reject(error)
|
||||
})
|
||||
})
|
||||
}
|
||||
134
src/config/mUtils.js
Normal file
@@ -0,0 +1,134 @@
|
||||
import store from '../vuex/store'
|
||||
|
||||
/**
|
||||
* 弹出框
|
||||
*/
|
||||
export const Dialog = (str) => {
|
||||
store.dispatch('showAlert', true)
|
||||
store.dispatch('alertMsg', str)
|
||||
// setTimeout(() => {
|
||||
// store.dispatch('showAlert', false)
|
||||
// }, 30000)
|
||||
}
|
||||
|
||||
/**
|
||||
* 提示框
|
||||
*/
|
||||
export const toast = (str) => {
|
||||
store.dispatch('showToast', true)
|
||||
store.dispatch('toastMsg', str)
|
||||
setTimeout(() => {
|
||||
store.dispatch('showToast', false)
|
||||
}, 3000)
|
||||
}
|
||||
|
||||
/**
|
||||
* 存储localStorage
|
||||
*/
|
||||
export const setStore = (name, content) => {
|
||||
if (!name) return
|
||||
if (typeof content !== 'string') {
|
||||
content = JSON.stringify(content)
|
||||
}
|
||||
window.localStorage.setItem(name, content)
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取localStorage
|
||||
*/
|
||||
export const getStore = name => {
|
||||
if (!name) return
|
||||
return window.localStorage.getItem(name)
|
||||
}
|
||||
|
||||
/**
|
||||
* 小数加法
|
||||
*/
|
||||
export const accAdd = (arg1, arg2) => {
|
||||
var r1, r2, m, c
|
||||
try {
|
||||
r1 = arg1.toString().split('.')[1].length
|
||||
} catch (e) {
|
||||
r1 = 0
|
||||
}
|
||||
try {
|
||||
r2 = arg2.toString().split('.')[1].length
|
||||
} catch (e) {
|
||||
r2 = 0
|
||||
}
|
||||
c = Math.abs(r1 - r2)
|
||||
m = Math.pow(10, Math.max(r1, r2))
|
||||
if (c > 0) {
|
||||
var cm = Math.pow(10, c)
|
||||
if (r1 > r2) {
|
||||
arg1 = Number(arg1.toString().replace('.', ''))
|
||||
arg2 = Number(arg2.toString().replace('.', '')) * cm
|
||||
} else {
|
||||
arg1 = Number(arg1.toString().replace('.', '')) * cm
|
||||
arg2 = Number(arg2.toString().replace('.', ''))
|
||||
}
|
||||
} else {
|
||||
arg1 = Number(arg1.toString().replace('.', ''))
|
||||
arg2 = Number(arg2.toString().replace('.', ''))
|
||||
}
|
||||
return (arg1 + arg2) / m
|
||||
}
|
||||
|
||||
/**
|
||||
* 小数减法
|
||||
*/
|
||||
export const accSubtract = (arg1, arg2) => {
|
||||
var r1, r2, m, c
|
||||
try {
|
||||
r1 = arg1.toString().split('.')[1].length
|
||||
} catch (e) {
|
||||
r1 = 0
|
||||
}
|
||||
try {
|
||||
r2 = arg2.toString().split('.')[1].length
|
||||
} catch (e) {
|
||||
r2 = 0
|
||||
}
|
||||
c = Math.abs(r1 - r2)
|
||||
m = Math.pow(10, Math.max(r1, r2))
|
||||
if (c > 0) {
|
||||
var cm = Math.pow(10, c)
|
||||
if (r1 > r2) {
|
||||
arg1 = Number(arg1.toString().replace('.', ''))
|
||||
arg2 = Number(arg2.toString().replace('.', '')) * cm
|
||||
} else {
|
||||
arg1 = Number(arg1.toString().replace('.', '')) * cm
|
||||
arg2 = Number(arg2.toString().replace('.', ''))
|
||||
}
|
||||
} else {
|
||||
arg1 = Number(arg1.toString().replace('.', ''))
|
||||
arg2 = Number(arg2.toString().replace('.', ''))
|
||||
}
|
||||
return (arg1 - arg2) / m
|
||||
}
|
||||
|
||||
/**
|
||||
* 小数乘法
|
||||
*/
|
||||
export const accMul = (arg1, arg2) => {
|
||||
var m = 0
|
||||
var s1 = arg1.toString()
|
||||
var s2 = arg2.toString()
|
||||
try { m += s1.split('.')[1].length } catch (e) {}
|
||||
try { m += s2.split('.')[1].length } catch (e) {}
|
||||
return Number(s1.replace('.', '')) * Number(s2.replace('.', '')) / Math.pow(10, m)
|
||||
}
|
||||
|
||||
/**
|
||||
* 求数组最大值
|
||||
*/
|
||||
export const maxArr = (arr) => {
|
||||
let max = Number(arr[0])
|
||||
let len = arr.length
|
||||
for (let i = 1; i < len; i++) {
|
||||
if (Number(arr[i]) > max) {
|
||||
max = Number(arr[i])
|
||||
}
|
||||
}
|
||||
return max
|
||||
}
|
||||
264
src/config/mork01.js
Normal file
354
src/config/mork1.js
Normal file
@@ -0,0 +1,354 @@
|
||||
/** 压制看板 */
|
||||
export const cockpitpress = () => {
|
||||
let res = {
|
||||
'PressOrderList': [
|
||||
{
|
||||
'planQty': '6000',
|
||||
'realQty': '6000',
|
||||
'rate': '1',
|
||||
'orderNumber': 'SY202401-04'
|
||||
},
|
||||
{
|
||||
'planQty': '1000',
|
||||
'realQty': '756',
|
||||
'rate': '0.76',
|
||||
'orderNumber': 'NY202401-03'
|
||||
},
|
||||
{
|
||||
'planQty': '1000',
|
||||
'realQty': '378',
|
||||
'rate': '0.38',
|
||||
'orderNumber': 'DX202401-01'
|
||||
}
|
||||
],
|
||||
'ProductionTask': [
|
||||
{
|
||||
'device': '压机01',
|
||||
'workorderCode': '240123001',
|
||||
'team': '白班',
|
||||
'materialName': '004',
|
||||
'customer': '实业股份',
|
||||
'planproducestartDate': '2024-01-23 08:28:14',
|
||||
'planQty': '1000',
|
||||
'realQty': '1015',
|
||||
'unqualifiedQty': '0',
|
||||
'qualifiedRate': '10.0',
|
||||
'workorderStatus': '生产中',
|
||||
'operator': '管理员',
|
||||
'realproducestartDate': '2024-01-23 08:31:28',
|
||||
'realproduceendDate': '-'
|
||||
},
|
||||
{
|
||||
'device': '压机02',
|
||||
'workorderCode': '240123002',
|
||||
'team': '白班',
|
||||
'materialName': '004',
|
||||
'customer': '实业股份',
|
||||
'planproducestartDate': '2024-01-23 08:28:59',
|
||||
'planQty': '1000',
|
||||
'realQty': '1008',
|
||||
'unqualifiedQty': '0',
|
||||
'qualifiedRate': '10.0',
|
||||
'workorderStatus': '生产中',
|
||||
'operator': '管理员',
|
||||
'realproducestartDate': '2024-01-23 08:31:36',
|
||||
'realproduceendDate': '-'
|
||||
},
|
||||
{
|
||||
'device': '压机03',
|
||||
'workorderCode': '240123003',
|
||||
'team': '白班',
|
||||
'materialName': '004',
|
||||
'customer': '实业股份',
|
||||
'planproducestartDate': '2024-01-23 08:29:30',
|
||||
'planQty': '1000',
|
||||
'realQty': '1287',
|
||||
'unqualifiedQty': '0',
|
||||
'qualifiedRate': '10.0',
|
||||
'workorderStatus': '生产中',
|
||||
'operator': '管理员',
|
||||
'realproducestartDate': '2024-01-23 08:31:42',
|
||||
'realproduceendDate': '-'
|
||||
},
|
||||
{
|
||||
'device': '压机04',
|
||||
'workorderCode': '240123004',
|
||||
'team': '白班',
|
||||
'materialName': '004',
|
||||
'customer': '实业股份',
|
||||
'planproducestartDate': '2024-01-23 08:29:55',
|
||||
'planQty': '1000',
|
||||
'realQty': '1260',
|
||||
'unqualifiedQty': '0',
|
||||
'qualifiedRate': '10.0',
|
||||
'workorderStatus': '生产中',
|
||||
'operator': '管理员',
|
||||
'realproducestartDate': '2024-01-23 08:31:50',
|
||||
'realproduceendDate': '-'
|
||||
},
|
||||
{
|
||||
'device': '压机05',
|
||||
'workorderCode': '240123005',
|
||||
'team': '白班',
|
||||
'materialName': '004',
|
||||
'customer': '实业股份',
|
||||
'planproducestartDate': '2024-01-23 08:34:27',
|
||||
'planQty': '1000',
|
||||
'realQty': '1764',
|
||||
'unqualifiedQty': '0',
|
||||
'qualifiedRate': '10.0',
|
||||
'workorderStatus': '生产中',
|
||||
'operator': '管理员',
|
||||
'realproducestartDate': '2024-01-23 08:40:05',
|
||||
'realproduceendDate': '-'
|
||||
},
|
||||
{
|
||||
'device': '压机06',
|
||||
'workorderCode': '240123006',
|
||||
'team': '白班',
|
||||
'materialName': '004',
|
||||
'customer': '实业股份',
|
||||
'planproducestartDate': '2024-01-23 08:34:57',
|
||||
'planQty': '1000',
|
||||
'realQty': '1512',
|
||||
'unqualifiedQty': '0',
|
||||
'qualifiedRate': '10.0',
|
||||
'workorderStatus': '生产中',
|
||||
'operator': '管理员',
|
||||
'realproducestartDate': '2024-01-23 08:40:13',
|
||||
'realproduceendDate': '-'
|
||||
},
|
||||
{
|
||||
'device': '压机07',
|
||||
'workorderCode': '240123007',
|
||||
'team': '白班',
|
||||
'materialName': '003',
|
||||
'customer': '镍业',
|
||||
'planproducestartDate': '2024-01-23 08:37:14',
|
||||
'planQty': '1000',
|
||||
'realQty': '756',
|
||||
'unqualifiedQty': '0',
|
||||
'qualifiedRate': '10.0',
|
||||
'workorderStatus': '生产中',
|
||||
'operator': '管理员',
|
||||
'realproducestartDate': '2024-01-23 08:40:18',
|
||||
'realproduceendDate': '-'
|
||||
},
|
||||
{
|
||||
'device': '压机08',
|
||||
'workorderCode': '240123008',
|
||||
'team': '白班',
|
||||
'materialName': '001',
|
||||
'customer': '鼎新',
|
||||
'planproducestartDate': '2024-01-23 08:37:59',
|
||||
'planQty': '1000',
|
||||
'realQty': '378',
|
||||
'unqualifiedQty': '0',
|
||||
'qualifiedRate': '10.0',
|
||||
'workorderStatus': '生产中',
|
||||
'operator': '管理员',
|
||||
'realproducestartDate': '2024-01-23 08:40:23',
|
||||
'realproduceendDate': '-'
|
||||
}
|
||||
],
|
||||
'DayShiftInfo': [
|
||||
{
|
||||
'planQty': '8000',
|
||||
'realQty': '8980',
|
||||
'unqualifiedQty': '0',
|
||||
'qualifiedQty': '800',
|
||||
'team': '白班'
|
||||
}
|
||||
],
|
||||
'ShiftProductionList': [
|
||||
{
|
||||
'columnName': '压机01',
|
||||
'qualifiedQty': '100',
|
||||
'unqualifiedQty': '0',
|
||||
'lastQty': '900'
|
||||
},
|
||||
{
|
||||
'columnName': '压机02',
|
||||
'qualifiedQty': '100',
|
||||
'unqualifiedQty': '0',
|
||||
'lastQty': '900'
|
||||
},
|
||||
{
|
||||
'columnName': '压机03',
|
||||
'qualifiedQty': '100',
|
||||
'unqualifiedQty': '0',
|
||||
'lastQty': '900'
|
||||
},
|
||||
{
|
||||
'columnName': '压机04',
|
||||
'qualifiedQty': '100',
|
||||
'unqualifiedQty': '0',
|
||||
'lastQty': '900'
|
||||
},
|
||||
{
|
||||
'columnName': '压机05',
|
||||
'qualifiedQty': '100',
|
||||
'unqualifiedQty': '0',
|
||||
'lastQty': '900'
|
||||
},
|
||||
{
|
||||
'columnName': '压机06',
|
||||
'qualifiedQty': '100',
|
||||
'unqualifiedQty': '0',
|
||||
'lastQty': '900'
|
||||
},
|
||||
{
|
||||
'columnName': '压机07',
|
||||
'qualifiedQty': '100',
|
||||
'unqualifiedQty': '0',
|
||||
'lastQty': '900'
|
||||
},
|
||||
{
|
||||
'columnName': '压机08',
|
||||
'qualifiedQty': '100',
|
||||
'unqualifiedQty': '0',
|
||||
'lastQty': '900'
|
||||
}
|
||||
]
|
||||
}
|
||||
return res
|
||||
}
|
||||
|
||||
/** 分拣作业监控 */
|
||||
export const cockpitsorting = () => {
|
||||
let res = {
|
||||
'sortingLine': [
|
||||
{
|
||||
'workorderCode': '240119006',
|
||||
'pointName': '分拣拆垛机械手01',
|
||||
'customer': '实业股份',
|
||||
'materialName': '004',
|
||||
'materialSpec': 'ZX',
|
||||
'planQty': '500',
|
||||
'realQty': '0'
|
||||
},
|
||||
{
|
||||
'workorderCode': '240228001',
|
||||
'pointName': '分拣拆垛机械手02',
|
||||
'customer': '实业股份',
|
||||
'materialName': '004',
|
||||
'materialSpec': 'ZX',
|
||||
'planQty': '1000',
|
||||
'realQty': '0'
|
||||
},
|
||||
{
|
||||
'workorderCode': '240228002',
|
||||
'pointName': '人工分拣拆01',
|
||||
'customer': '沙湾',
|
||||
'materialName': '004',
|
||||
'materialSpec': 'ZX',
|
||||
'planQty': '500',
|
||||
'realQty': '0'
|
||||
}
|
||||
],
|
||||
'unstackingList': [
|
||||
{
|
||||
'vehicleCode': '0014',
|
||||
'materialQty': '0',
|
||||
'materialWeight': '0.00',
|
||||
'materialName': '004',
|
||||
'createTime': '03-04 16:13:37'
|
||||
},
|
||||
{
|
||||
'vehicleCode': '0005',
|
||||
'materialQty': '252',
|
||||
'materialWeight': '0.00',
|
||||
'materialName': '004',
|
||||
'createTime': '03-04 15:22:50'
|
||||
},
|
||||
{
|
||||
'vehicleCode': '0040',
|
||||
'materialQty': '126',
|
||||
'materialWeight': '0.00',
|
||||
'materialName': '004',
|
||||
'createTime': '03-04 14:42:00'
|
||||
},
|
||||
{
|
||||
'vehicleCode': '0050',
|
||||
'materialQty': '0',
|
||||
'materialWeight': '0.00',
|
||||
'materialName': '004',
|
||||
'createTime': '03-04 13:21:53'
|
||||
},
|
||||
{
|
||||
'vehicleCode': '1069',
|
||||
'materialQty': '252',
|
||||
'materialWeight': '0.00',
|
||||
'materialName': null,
|
||||
'createTime': '03-04 13:21:01'
|
||||
},
|
||||
{
|
||||
'vehicleCode': '1066',
|
||||
'materialQty': '0',
|
||||
'materialWeight': '0.00',
|
||||
'materialName': '004',
|
||||
'createTime': '03-04 12:23:39'
|
||||
},
|
||||
{
|
||||
'vehicleCode': '0006',
|
||||
'materialQty': '0',
|
||||
'materialWeight': '0.00',
|
||||
'materialName': '004',
|
||||
'createTime': '03-04 11:05:11'
|
||||
},
|
||||
{
|
||||
'vehicleCode': '1055',
|
||||
'materialQty': '0',
|
||||
'materialWeight': '0.00',
|
||||
'materialName': '004',
|
||||
'createTime': '03-04 10:48:18'
|
||||
},
|
||||
{
|
||||
'vehicleCode': '0048',
|
||||
'materialQty': '0',
|
||||
'materialWeight': '0.00',
|
||||
'materialName': '004',
|
||||
'createTime': '03-04 09:58:48'
|
||||
},
|
||||
{
|
||||
'vehicleCode': '0011',
|
||||
'materialQty': '0',
|
||||
'materialWeight': '0.00',
|
||||
'materialName': '004',
|
||||
'createTime': '03-04 09:16:21'
|
||||
},
|
||||
{
|
||||
'vehicleCode': '0046',
|
||||
'materialQty': '0',
|
||||
'materialWeight': '0.00',
|
||||
'materialName': '004',
|
||||
'createTime': '03-04 08:56:25'
|
||||
}
|
||||
],
|
||||
'lastWorkOrderList': [
|
||||
{
|
||||
'workorderCode': '240119006',
|
||||
'materialName': '004',
|
||||
'materialSpec': 'ZX',
|
||||
'planQty': '500',
|
||||
'planWeight': '0',
|
||||
'produceOrder': 'SY202401-04',
|
||||
'customer': '实业股份',
|
||||
'vehicleType': '1030*930',
|
||||
'createTime': '01-19 18:04:57'
|
||||
},
|
||||
{
|
||||
'workorderCode': '240228001',
|
||||
'materialName': '004',
|
||||
'materialSpec': 'ZX',
|
||||
'planQty': '1000',
|
||||
'planWeight': '0',
|
||||
'produceOrder': 'SY202401-04',
|
||||
'customer': '实业股份',
|
||||
'vehicleType': '950*930',
|
||||
'createTime': '02-28 09:50:48'
|
||||
}
|
||||
]
|
||||
}
|
||||
return res
|
||||
}
|
||||
926
src/config/mork2.js
Normal file
@@ -0,0 +1,926 @@
|
||||
/**
|
||||
* 大屏首页设备
|
||||
*/
|
||||
export const deviceCondition = () => {
|
||||
let res = {
|
||||
'MixMachineList': [
|
||||
{
|
||||
'device_status': 2,
|
||||
'error_time': 0,
|
||||
'stand_time': 10,
|
||||
'real_qty': 255,
|
||||
'device_code': 'HNJ01',
|
||||
'mix_num': 2,
|
||||
'open_time': '09:54:53.147',
|
||||
'work_time': 10,
|
||||
'error': 0
|
||||
},
|
||||
{
|
||||
'device_status': 2,
|
||||
'error_time': 0,
|
||||
'stand_time': 10,
|
||||
'real_qty': 255,
|
||||
'device_code': 'HNJ02',
|
||||
'mix_num': 2,
|
||||
'open_time': '09:54:53.147',
|
||||
'work_time': 10,
|
||||
'error': 0
|
||||
},
|
||||
{
|
||||
'device_status': 2,
|
||||
'error_time': 0,
|
||||
'stand_time': 10,
|
||||
'real_qty': 255,
|
||||
'device_code': 'HNJ03',
|
||||
'mix_num': 2,
|
||||
'open_time': '09:54:53.147',
|
||||
'work_time': 10,
|
||||
'error': 0
|
||||
},
|
||||
{
|
||||
'device_status': 2,
|
||||
'error_time': 0,
|
||||
'stand_time': 10,
|
||||
'real_qty': 255,
|
||||
'device_code': 'HNJ04',
|
||||
'mix_num': 2,
|
||||
'open_time': '09:54:53.147',
|
||||
'work_time': 10,
|
||||
'error': 0
|
||||
},
|
||||
{
|
||||
'device_status': 2,
|
||||
'error_time': 0,
|
||||
'stand_time': 10,
|
||||
'real_qty': 255,
|
||||
'device_code': 'HNJ05',
|
||||
'mix_num': 2,
|
||||
'open_time': '09:54:53.147',
|
||||
'work_time': 10,
|
||||
'error': 0
|
||||
},
|
||||
{
|
||||
'device_status': 2,
|
||||
'error_time': 0,
|
||||
'stand_time': 10,
|
||||
'real_qty': 255,
|
||||
'device_code': 'HNJ06',
|
||||
'mix_num': 2,
|
||||
'open_time': '09:54:53.147',
|
||||
'work_time': 10,
|
||||
'error': 0
|
||||
},
|
||||
{
|
||||
'device_status': 2,
|
||||
'error_time': 0,
|
||||
'stand_time': 10,
|
||||
'real_qty': 255,
|
||||
'device_code': 'HNJ07',
|
||||
'mix_num': 2,
|
||||
'open_time': '09:54:53.147',
|
||||
'work_time': 10,
|
||||
'error': 0
|
||||
},
|
||||
{
|
||||
'device_status': 2,
|
||||
'error_time': 0,
|
||||
'stand_time': 10,
|
||||
'real_qty': 255,
|
||||
'device_code': 'HNJ08',
|
||||
'mix_num': 2,
|
||||
'open_time': '09:54:53.147',
|
||||
'work_time': 10,
|
||||
'error': 0
|
||||
}
|
||||
],
|
||||
'ManipulatorInfoList': [
|
||||
{
|
||||
'device_status': 2,
|
||||
'error_time': 0,
|
||||
'stand_time': 10,
|
||||
'real_qty': 255,
|
||||
'color_status': 2,
|
||||
'device_code': 'FJCDJXS01',
|
||||
'open_time': '06:54:53.147',
|
||||
'work_time': 40,
|
||||
'error': 0
|
||||
},
|
||||
{
|
||||
'device_status': 2,
|
||||
'error_time': 0,
|
||||
'stand_time': 10,
|
||||
'real_qty': 255,
|
||||
'color_status': 2,
|
||||
'device_code': 'FJMDJXS01',
|
||||
'open_time': '06:54:53.147',
|
||||
'work_time': 40,
|
||||
'error': 0
|
||||
},
|
||||
{
|
||||
'device_status': 2,
|
||||
'error_time': 0,
|
||||
'stand_time': 10,
|
||||
'real_qty': 255,
|
||||
'color_status': 2,
|
||||
'device_code': 'FJMDJXS02',
|
||||
'open_time': '06:54:53.147',
|
||||
'work_time': 40,
|
||||
'error': 0
|
||||
},
|
||||
{
|
||||
'device_status': 2,
|
||||
'error_time': 0,
|
||||
'stand_time': 10,
|
||||
'color_status': 2,
|
||||
'device_code': 'YZJXS01',
|
||||
'open_time': '07:54:53.147',
|
||||
'work_time': 50,
|
||||
'error': 0
|
||||
},
|
||||
{
|
||||
'device_status': 2,
|
||||
'error_time': 0,
|
||||
'stand_time': 10,
|
||||
'color_status': 2,
|
||||
'device_code': 'YZJXS02',
|
||||
'open_time': '07:54:53.147',
|
||||
'work_time': 50,
|
||||
'error': 0
|
||||
},
|
||||
{
|
||||
'device_status': 2,
|
||||
'error_time': 0,
|
||||
'stand_time': 10,
|
||||
'color_status': 2,
|
||||
'device_code': 'YZJXS03',
|
||||
'open_time': '07:54:53.147',
|
||||
'work_time': 50,
|
||||
'error': 0
|
||||
},
|
||||
{
|
||||
'device_status': 2,
|
||||
'error_time': 0,
|
||||
'stand_time': 10,
|
||||
'color_status': 2,
|
||||
'device_code': 'YZJXS04',
|
||||
'open_time': '07:54:53.147',
|
||||
'work_time': 50,
|
||||
'error': 0
|
||||
},
|
||||
{
|
||||
'device_status': 2,
|
||||
'error_time': 0,
|
||||
'stand_time': 10,
|
||||
'color_status': 2,
|
||||
'device_code': 'YZJXS05',
|
||||
'open_time': '07:54:53.147',
|
||||
'work_time': 50,
|
||||
'error': 0
|
||||
}
|
||||
],
|
||||
'SortAndPalletizingList': [
|
||||
{
|
||||
'mode': 3,
|
||||
'device_status': 2,
|
||||
'move': 2,
|
||||
'device_code': 'FJ01CDW01',
|
||||
'error': 0,
|
||||
'encoder_qty': 100,
|
||||
'barcode': 10010
|
||||
},
|
||||
{
|
||||
'mode': 3,
|
||||
'device_status': 2,
|
||||
'move': 2,
|
||||
'device_code': 'FJ01CDW02',
|
||||
'error': 0,
|
||||
'encoder_qty': 100,
|
||||
'barcode': 10010
|
||||
},
|
||||
{
|
||||
'mode': 3,
|
||||
'device_status': 2,
|
||||
'move': 2,
|
||||
'device_code': 'FJ01MDW01',
|
||||
'error': 0,
|
||||
'encoder_qty': 100,
|
||||
'barcode': 10010
|
||||
},
|
||||
{
|
||||
'mode': 3,
|
||||
'device_status': 2,
|
||||
'move': 2,
|
||||
'device_code': 'FJ01MDW02',
|
||||
'error': 0,
|
||||
'encoder_qty': 100,
|
||||
'barcode': 10010
|
||||
}
|
||||
],
|
||||
'manualSortingList': [
|
||||
{
|
||||
'pointStatus': '1',
|
||||
'pointName': '人工分拣拆01',
|
||||
'pointCode': 'RGFJC01'
|
||||
},
|
||||
{
|
||||
'pointStatus': '2',
|
||||
'pointName': '人工分拣拆02',
|
||||
'pointCode': 'RGFJC02'
|
||||
},
|
||||
{
|
||||
'pointStatus': '2',
|
||||
'pointName': '人工分拣拆03',
|
||||
'pointCode': 'RGFJC03'
|
||||
},
|
||||
{
|
||||
'pointStatus': '1',
|
||||
'pointName': '人工分拣拆04',
|
||||
'pointCode': 'RGFJC04'
|
||||
},
|
||||
{
|
||||
'pointStatus': '1',
|
||||
'pointName': '人工分拣拆05',
|
||||
'pointCode': 'RGFJC05'
|
||||
},
|
||||
{
|
||||
'pointStatus': '1',
|
||||
'pointName': '人工分拣拆06',
|
||||
'pointCode': 'RGFJC06'
|
||||
}
|
||||
],
|
||||
'PressMachineList': [
|
||||
{
|
||||
'device_status': 2,
|
||||
'error_time': 0,
|
||||
'stand_time': 10,
|
||||
'real_qty': 255,
|
||||
'device_code': 'YJ01',
|
||||
'open_time': '05:54:53.147',
|
||||
'work_time': 20,
|
||||
'current_weight': 1000,
|
||||
'error': 0,
|
||||
'now_capacity': '255'
|
||||
},
|
||||
{
|
||||
'device_status': 2,
|
||||
'error_time': 0,
|
||||
'stand_time': 10,
|
||||
'real_qty': 255,
|
||||
'device_code': 'YJ02',
|
||||
'open_time': '05:54:53.147',
|
||||
'work_time': 20,
|
||||
'current_weight': 1000,
|
||||
'error': 0,
|
||||
'now_capacity': '255'
|
||||
},
|
||||
{
|
||||
'device_status': 2,
|
||||
'error_time': 0,
|
||||
'stand_time': 10,
|
||||
'real_qty': 255,
|
||||
'device_code': 'YJ03',
|
||||
'open_time': '05:54:53.147',
|
||||
'work_time': 20,
|
||||
'current_weight': 1000,
|
||||
'error': 0,
|
||||
'now_capacity': '255'
|
||||
},
|
||||
{
|
||||
'device_status': 2,
|
||||
'error_time': 0,
|
||||
'stand_time': 10,
|
||||
'real_qty': 255,
|
||||
'device_code': 'YJ04',
|
||||
'open_time': '05:54:53.147',
|
||||
'work_time': 20,
|
||||
'current_weight': 1000,
|
||||
'error': 0,
|
||||
'now_capacity': '255'
|
||||
},
|
||||
{
|
||||
'device_status': 2,
|
||||
'error_time': 0,
|
||||
'stand_time': 10,
|
||||
'real_qty': 255,
|
||||
'device_code': 'YJ05',
|
||||
'open_time': '05:54:53.147',
|
||||
'work_time': 20,
|
||||
'current_weight': 1000,
|
||||
'error': 0,
|
||||
'now_capacity': '255'
|
||||
},
|
||||
{
|
||||
'device_status': 2,
|
||||
'error_time': 0,
|
||||
'stand_time': 10,
|
||||
'real_qty': 255,
|
||||
'device_code': 'YJ06',
|
||||
'open_time': '05:54:53.147',
|
||||
'work_time': 20,
|
||||
'current_weight': 1000,
|
||||
'error': 0,
|
||||
'now_capacity': '255'
|
||||
},
|
||||
{
|
||||
'device_status': 2,
|
||||
'error_time': 0,
|
||||
'stand_time': 10,
|
||||
'real_qty': 255,
|
||||
'device_code': 'YJ07',
|
||||
'open_time': '05:54:53.147',
|
||||
'work_time': 20,
|
||||
'current_weight': 1000,
|
||||
'error': 0,
|
||||
'now_capacity': '255'
|
||||
},
|
||||
{
|
||||
'device_status': 2,
|
||||
'error_time': 0,
|
||||
'stand_time': 10,
|
||||
'real_qty': 255,
|
||||
'device_code': 'YJ08',
|
||||
'open_time': '05:54:53.147',
|
||||
'work_time': 20,
|
||||
'current_weight': 1000,
|
||||
'error': 0,
|
||||
'now_capacity': '255'
|
||||
}
|
||||
],
|
||||
'MixBlankingList': [
|
||||
{
|
||||
'pointStatus': '1',
|
||||
'pointName': '混碾机01对接位',
|
||||
'pointCode': 'HNJ01DJW'
|
||||
},
|
||||
{
|
||||
'pointStatus': '1',
|
||||
'pointName': '混碾机02对接位',
|
||||
'pointCode': 'HNJ02DJW'
|
||||
},
|
||||
{
|
||||
'pointStatus': '1',
|
||||
'pointName': '混碾机03对接位',
|
||||
'pointCode': 'HNJ03DJW'
|
||||
},
|
||||
{
|
||||
'pointStatus': '1',
|
||||
'pointName': '混碾机04对接位',
|
||||
'pointCode': 'HNJ04DJW'
|
||||
},
|
||||
{
|
||||
'pointStatus': '1',
|
||||
'pointName': '混碾机05对接位',
|
||||
'pointCode': 'HNJ05DJW'
|
||||
},
|
||||
{
|
||||
'pointStatus': '1',
|
||||
'pointName': '混碾机06对接位',
|
||||
'pointCode': 'HNJ06DJW'
|
||||
},
|
||||
{
|
||||
'pointStatus': '1',
|
||||
'pointName': '混碾机07对接位',
|
||||
'pointCode': 'HNJ07DJW'
|
||||
},
|
||||
{
|
||||
'pointStatus': '1',
|
||||
'pointName': '混碾机08对接位',
|
||||
'pointCode': 'HNJ08DJW'
|
||||
}
|
||||
],
|
||||
'hchjList': [
|
||||
{
|
||||
'pointStatus': '1',
|
||||
'pointName': '缓存货架01',
|
||||
'pointCode': 'HCHJ01'
|
||||
},
|
||||
{
|
||||
'pointStatus': '1',
|
||||
'pointName': '缓存货架02',
|
||||
'pointCode': 'HCHJ02'
|
||||
},
|
||||
{
|
||||
'pointStatus': '1',
|
||||
'pointName': '缓存货架03',
|
||||
'pointCode': 'HCHJ03'
|
||||
},
|
||||
{
|
||||
'pointStatus': '1',
|
||||
'pointName': '缓存货架04',
|
||||
'pointCode': 'HCHJ04'
|
||||
},
|
||||
{
|
||||
'pointStatus': '1',
|
||||
'pointName': '缓存货架05',
|
||||
'pointCode': 'HCHJ05'
|
||||
},
|
||||
{
|
||||
'pointStatus': '1',
|
||||
'pointName': '缓存货架06',
|
||||
'pointCode': 'HCHJ06'
|
||||
},
|
||||
{
|
||||
'pointStatus': '1',
|
||||
'pointName': '缓存货架07',
|
||||
'pointCode': 'HCHJ07'
|
||||
},
|
||||
{
|
||||
'pointStatus': '1',
|
||||
'pointName': '缓存货架08',
|
||||
'pointCode': 'HCHJ08'
|
||||
},
|
||||
{
|
||||
'pointStatus': '1',
|
||||
'pointName': '缓存货架09',
|
||||
'pointCode': 'HCHJ09'
|
||||
},
|
||||
{
|
||||
'pointStatus': '1',
|
||||
'pointName': '缓存货架10',
|
||||
'pointCode': 'HCHJ10'
|
||||
},
|
||||
{
|
||||
'pointStatus': '1',
|
||||
'pointName': '缓存货架11',
|
||||
'pointCode': 'HCHJ11'
|
||||
},
|
||||
{
|
||||
'pointStatus': '3',
|
||||
'pointName': '缓存货架12',
|
||||
'pointCode': 'HCHJ12'
|
||||
},
|
||||
{
|
||||
'pointStatus': '3',
|
||||
'pointName': '缓存货架13',
|
||||
'pointCode': 'HCHJ13'
|
||||
},
|
||||
{
|
||||
'pointStatus': '3',
|
||||
'pointName': '缓存货架14',
|
||||
'pointCode': 'HCHJ14'
|
||||
},
|
||||
{
|
||||
'pointStatus': '3',
|
||||
'pointName': '缓存货架15',
|
||||
'pointCode': 'HCHJ15'
|
||||
},
|
||||
{
|
||||
'pointStatus': '3',
|
||||
'pointName': '缓存货架16',
|
||||
'pointCode': 'HCHJ16'
|
||||
},
|
||||
{
|
||||
'pointStatus': '3',
|
||||
'pointName': '缓存货架17',
|
||||
'pointCode': 'HCHJ17'
|
||||
},
|
||||
{
|
||||
'pointStatus': '3',
|
||||
'pointName': '缓存货架18',
|
||||
'pointCode': 'HCHJ18'
|
||||
},
|
||||
{
|
||||
'pointStatus': '1',
|
||||
'pointName': '缓存货架19',
|
||||
'pointCode': 'HCHJ19'
|
||||
},
|
||||
{
|
||||
'pointStatus': '1',
|
||||
'pointName': '缓存货架20',
|
||||
'pointCode': 'HCHJ20'
|
||||
},
|
||||
{
|
||||
'pointStatus': '1',
|
||||
'pointName': '缓存货架21',
|
||||
'pointCode': 'HCHJ21'
|
||||
},
|
||||
{
|
||||
'pointStatus': '1',
|
||||
'pointName': '缓存货架22',
|
||||
'pointCode': 'HCHJ22'
|
||||
},
|
||||
{
|
||||
'pointStatus': '1',
|
||||
'pointName': '缓存货架23',
|
||||
'pointCode': 'HCHJ23'
|
||||
},
|
||||
{
|
||||
'pointStatus': '1',
|
||||
'pointName': '缓存货架24',
|
||||
'pointCode': 'HCHJ24'
|
||||
},
|
||||
{
|
||||
'pointStatus': '1',
|
||||
'pointName': '缓存货架25',
|
||||
'pointCode': 'HCHJ25'
|
||||
},
|
||||
{
|
||||
'pointStatus': '2',
|
||||
'pointName': '缓存货架26',
|
||||
'pointCode': 'HCHJ26'
|
||||
},
|
||||
{
|
||||
'pointStatus': '2',
|
||||
'pointName': '缓存货架27',
|
||||
'pointCode': 'HCHJ27'
|
||||
},
|
||||
{
|
||||
'pointStatus': '2',
|
||||
'pointName': '缓存货架28',
|
||||
'pointCode': 'HCHJ28'
|
||||
},
|
||||
{
|
||||
'pointStatus': '2',
|
||||
'pointName': '缓存货架29',
|
||||
'pointCode': 'HCHJ29'
|
||||
},
|
||||
{
|
||||
'pointStatus': '2',
|
||||
'pointName': '缓存货架30',
|
||||
'pointCode': 'HCHJ30'
|
||||
},
|
||||
{
|
||||
'pointStatus': '2',
|
||||
'pointName': '缓存货架31',
|
||||
'pointCode': 'HCHJ31'
|
||||
},
|
||||
{
|
||||
'pointStatus': '2',
|
||||
'pointName': '缓存货架32',
|
||||
'pointCode': 'HCHJ32'
|
||||
},
|
||||
{
|
||||
'pointStatus': '2',
|
||||
'pointName': '缓存货架33',
|
||||
'pointCode': 'HCHJ33'
|
||||
},
|
||||
{
|
||||
'pointStatus': '2',
|
||||
'pointName': '缓存货架34',
|
||||
'pointCode': 'HCHJ34'
|
||||
},
|
||||
{
|
||||
'pointStatus': '1',
|
||||
'pointName': '缓存货架35',
|
||||
'pointCode': 'HCHJ35'
|
||||
},
|
||||
{
|
||||
'pointStatus': '1',
|
||||
'pointName': '缓存货架36',
|
||||
'pointCode': 'HCHJ36'
|
||||
},
|
||||
{
|
||||
'pointStatus': '1',
|
||||
'pointName': '缓存货架37',
|
||||
'pointCode': 'HCHJ37'
|
||||
},
|
||||
{
|
||||
'pointStatus': '1',
|
||||
'pointName': '缓存货架38',
|
||||
'pointCode': 'HCHJ38'
|
||||
},
|
||||
{
|
||||
'pointStatus': '1',
|
||||
'pointName': '缓存货架39',
|
||||
'pointCode': 'HCHJ39'
|
||||
},
|
||||
{
|
||||
'pointStatus': '1',
|
||||
'pointName': '缓存货架40',
|
||||
'pointCode': 'HCHJ40'
|
||||
},
|
||||
{
|
||||
'pointStatus': '1',
|
||||
'pointName': '缓存货架41',
|
||||
'pointCode': 'HCHJ41'
|
||||
},
|
||||
{
|
||||
'pointStatus': '1',
|
||||
'pointName': '缓存货架42',
|
||||
'pointCode': 'HCHJ42'
|
||||
},
|
||||
{
|
||||
'pointStatus': '1',
|
||||
'pointName': '缓存货架43',
|
||||
'pointCode': 'HCHJ43'
|
||||
},
|
||||
{
|
||||
'pointStatus': '1',
|
||||
'pointName': '缓存货架44',
|
||||
'pointCode': 'HCHJ44'
|
||||
}
|
||||
],
|
||||
'StackingPositionList': [
|
||||
{
|
||||
'mode': 3,
|
||||
'device_status': 2,
|
||||
'move': 2,
|
||||
'device_code': 'YJ01XLW01',
|
||||
'error': 0,
|
||||
'encoder_qty': 100,
|
||||
'barcode': 10010
|
||||
},
|
||||
{
|
||||
'mode': 3,
|
||||
'device_status': 2,
|
||||
'move': 2,
|
||||
'device_code': 'YJ01XLW02',
|
||||
'error': 0,
|
||||
'encoder_qty': 100,
|
||||
'barcode': 10010
|
||||
},
|
||||
{
|
||||
'mode': 3,
|
||||
'device_status': 2,
|
||||
'move': 2,
|
||||
'device_code': 'YJ02XLW01',
|
||||
'error': 0,
|
||||
'encoder_qty': 100,
|
||||
'barcode': 10010
|
||||
},
|
||||
{
|
||||
'mode': 3,
|
||||
'device_status': 2,
|
||||
'move': 2,
|
||||
'device_code': 'YJ02XLW02',
|
||||
'error': 0,
|
||||
'encoder_qty': 100,
|
||||
'barcode': 10010
|
||||
},
|
||||
{
|
||||
'mode': 3,
|
||||
'device_status': 2,
|
||||
'move': 2,
|
||||
'device_code': 'YJ03XLW01',
|
||||
'error': 0,
|
||||
'encoder_qty': 100,
|
||||
'barcode': 10010
|
||||
},
|
||||
{
|
||||
'mode': 3,
|
||||
'device_status': 2,
|
||||
'move': 2,
|
||||
'device_code': 'YJ03XLW02',
|
||||
'error': 0,
|
||||
'encoder_qty': 100,
|
||||
'barcode': 10010
|
||||
},
|
||||
{
|
||||
'mode': 3,
|
||||
'device_status': 2,
|
||||
'move': 2,
|
||||
'device_code': 'YJ04XLW01',
|
||||
'error': 0,
|
||||
'encoder_qty': 100,
|
||||
'barcode': 10010
|
||||
},
|
||||
{
|
||||
'mode': 3,
|
||||
'device_status': 2,
|
||||
'move': 2,
|
||||
'device_code': 'YJ04XLW02',
|
||||
'error': 0,
|
||||
'encoder_qty': 100,
|
||||
'barcode': 10010
|
||||
},
|
||||
{
|
||||
'mode': 3,
|
||||
'device_status': 2,
|
||||
'move': 2,
|
||||
'device_code': 'YJ05XLW01',
|
||||
'error': 0,
|
||||
'encoder_qty': 100,
|
||||
'barcode': 10010
|
||||
},
|
||||
{
|
||||
'mode': 3,
|
||||
'device_status': 2,
|
||||
'move': 2,
|
||||
'device_code': 'YJ05XLW02',
|
||||
'error': 0,
|
||||
'encoder_qty': 100,
|
||||
'barcode': 10010
|
||||
},
|
||||
{
|
||||
'mode': 3,
|
||||
'device_status': 2,
|
||||
'move': 2,
|
||||
'device_code': 'YJ06XLW01',
|
||||
'error': 0,
|
||||
'encoder_qty': 100,
|
||||
'barcode': 10010
|
||||
},
|
||||
{
|
||||
'mode': 3,
|
||||
'device_status': 2,
|
||||
'move': 2,
|
||||
'device_code': 'YJ06XLW02',
|
||||
'error': 0,
|
||||
'encoder_qty': 100,
|
||||
'barcode': 10010
|
||||
},
|
||||
{
|
||||
'mode': 3,
|
||||
'device_status': 2,
|
||||
'move': 2,
|
||||
'device_code': 'YJ07XLW01',
|
||||
'error': 0,
|
||||
'encoder_qty': 100,
|
||||
'barcode': 10010
|
||||
},
|
||||
{
|
||||
'mode': 3,
|
||||
'device_status': 2,
|
||||
'move': 2,
|
||||
'device_code': 'YJ07XLW02',
|
||||
'error': 0,
|
||||
'encoder_qty': 100,
|
||||
'barcode': 10010
|
||||
},
|
||||
{
|
||||
'mode': 3,
|
||||
'device_status': 2,
|
||||
'move': 2,
|
||||
'device_code': 'YJ08XLW01',
|
||||
'error': 0,
|
||||
'encoder_qty': 100,
|
||||
'barcode': 10010
|
||||
},
|
||||
{
|
||||
'mode': 3,
|
||||
'device_status': 2,
|
||||
'move': 2,
|
||||
'device_code': 'YJ08XLW02',
|
||||
'error': 0,
|
||||
'encoder_qty': 100,
|
||||
'barcode': 10010
|
||||
}
|
||||
]
|
||||
}
|
||||
return res
|
||||
}
|
||||
/**
|
||||
* 出、入窑输送线弹窗
|
||||
*/
|
||||
export const inOutKilnDetail = () => {
|
||||
let res = [
|
||||
{
|
||||
'stat': '1',
|
||||
'pointName': '入窑输送线',
|
||||
'workTime': '3.5',
|
||||
'palletNum': '0',
|
||||
'materialNum': '25000',
|
||||
'deliveredPalletNum': '0',
|
||||
'deliveredMaterialNum': null
|
||||
},
|
||||
{
|
||||
'stat': '1',
|
||||
'pointName': '出窑输送线',
|
||||
'workTime': '3.5',
|
||||
'palletNum': '0',
|
||||
'materialNum': '25000',
|
||||
'deliveredPalletNum': '0',
|
||||
'deliveredMaterialNum': '25000'
|
||||
}
|
||||
]
|
||||
return res
|
||||
}
|
||||
/**
|
||||
* 窑弹出框
|
||||
*/
|
||||
export const kilnDetail = () => {
|
||||
let res = {
|
||||
'pointName': '窑1',
|
||||
'workTime': 'string',
|
||||
'palletNum': 'string',
|
||||
'materialNum': 'string',
|
||||
'produceNum': 'string',
|
||||
'materialInfos': [
|
||||
'string'
|
||||
]
|
||||
}
|
||||
return res
|
||||
}
|
||||
/**
|
||||
* 大屏-两侧图表
|
||||
*/
|
||||
export const screenTableData = () => {
|
||||
let res = {
|
||||
'deviceErrorRecordList': [
|
||||
{
|
||||
'deviceCode': 'YJ06',
|
||||
'deviceName': '压机06',
|
||||
'errorInfo': '故障',
|
||||
'errorTime': '2024-02-28 13:02:44'
|
||||
},
|
||||
{
|
||||
'deviceCode': 'YJ01',
|
||||
'deviceName': '压机01',
|
||||
'errorInfo': '故障',
|
||||
'errorTime': '2024-02-28 13:02:44'
|
||||
},
|
||||
{
|
||||
'deviceCode': 'YJ02',
|
||||
'deviceName': '压机02',
|
||||
'errorInfo': '故障',
|
||||
'errorTime': '2024-02-28 13:02:44'
|
||||
},
|
||||
{
|
||||
'deviceCode': 'YJ03',
|
||||
'deviceName': '压机03',
|
||||
'errorInfo': '故障',
|
||||
'errorTime': '2024-02-28 13:02:44'
|
||||
},
|
||||
{
|
||||
'deviceCode': 'YJ03',
|
||||
'deviceName': '压机03',
|
||||
'errorInfo': '故障',
|
||||
'errorTime': '2024-02-28 13:02:44'
|
||||
}
|
||||
],
|
||||
'mixingList': [
|
||||
{
|
||||
'materialName': '004',
|
||||
'planQty': '0',
|
||||
'realQty': '0'
|
||||
}
|
||||
],
|
||||
'historyList': [
|
||||
{
|
||||
'produceDate': '03-06',
|
||||
'suppressedNum': '800',
|
||||
'finishedNum': '0'
|
||||
}
|
||||
],
|
||||
'deviceErrorList': [
|
||||
{
|
||||
'deviceName': '压机01',
|
||||
'errorNum': '1'
|
||||
},
|
||||
{
|
||||
'deviceName': '压机02',
|
||||
'errorNum': '2'
|
||||
},
|
||||
{
|
||||
'deviceName': '压机03',
|
||||
'errorNum': '3'
|
||||
},
|
||||
{
|
||||
'deviceName': '压机04',
|
||||
'errorNum': '4'
|
||||
},
|
||||
{
|
||||
'deviceName': '压机05',
|
||||
'errorNum': '5'
|
||||
},
|
||||
{
|
||||
'deviceName': '压机06',
|
||||
'errorNum': '6'
|
||||
},
|
||||
{
|
||||
'deviceName': '压机07',
|
||||
'errorNum': '7'
|
||||
},
|
||||
{
|
||||
'deviceName': '压机08',
|
||||
'errorNum': '8'
|
||||
},
|
||||
{
|
||||
'deviceName': '压机09',
|
||||
'errorNum': '9'
|
||||
},
|
||||
{
|
||||
'deviceName': '压机10',
|
||||
'errorNum': '10'
|
||||
}
|
||||
],
|
||||
'deviceRunStat': {
|
||||
'total': 240,
|
||||
'runNum': 0,
|
||||
'unProducedNum': 240,
|
||||
'freeNum': 0,
|
||||
'errorNum': 0
|
||||
},
|
||||
'productList': [
|
||||
{
|
||||
'materialName': '001',
|
||||
'requiredNum': '1000',
|
||||
'suppressedNum': '378',
|
||||
'finishedNum': '100'
|
||||
},
|
||||
{
|
||||
'materialName': '003',
|
||||
'requiredNum': '1000',
|
||||
'suppressedNum': '756',
|
||||
'finishedNum': '0'
|
||||
},
|
||||
{
|
||||
'materialName': '004',
|
||||
'requiredNum': '6000',
|
||||
'suppressedNum': '7846',
|
||||
'finishedNum': '0'
|
||||
}
|
||||
]
|
||||
}
|
||||
return res
|
||||
}
|
||||
13
src/config/rem.js
Normal file
@@ -0,0 +1,13 @@
|
||||
(function (doc, win) {
|
||||
var docEl = doc.documentElement
|
||||
var resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize'
|
||||
var recalc = function () {
|
||||
var clientWidth = docEl.clientWidth
|
||||
if (!clientWidth) return
|
||||
docEl.style.fontSize = 100 * (clientWidth / 1920) + 'px'
|
||||
document.body.style.display = 'block'
|
||||
}
|
||||
if (!doc.addEventListener) return win.addEventListener(resizeEvt, recalc, false)
|
||||
doc.addEventListener('DOMContentLoaded', recalc, false)
|
||||
})(document, window)
|
||||
// 晟华大屏尺寸2560*1440,屏幕太大用rem样式会错乱,现在使用px、%
|
||||
49
src/css/mixin.styl
Normal file
@@ -0,0 +1,49 @@
|
||||
$red = #ed4754
|
||||
$green = #67c23a
|
||||
$yellow = #f2d648
|
||||
$orange = #f17d3a
|
||||
$blue = #6798ef
|
||||
$gray = #c9c9c9
|
||||
$fc1 = #323232
|
||||
|
||||
.green
|
||||
background-color #11ff0d
|
||||
.yellow
|
||||
background-color #fdfd0f
|
||||
.gray
|
||||
background-color #bfbfbf
|
||||
.red
|
||||
background-color #ff1016
|
||||
|
||||
//宽高
|
||||
_wh(w, h)
|
||||
width: w
|
||||
height: h
|
||||
|
||||
//字体大小、行高、颜色
|
||||
_font(size,height,color=$fc1,weight=normal,align=left)
|
||||
font-size: size
|
||||
line-height: height
|
||||
color: color
|
||||
font-weight: weight
|
||||
text-align: align
|
||||
|
||||
//flex 布局和 子元素 对其方式
|
||||
_fj(x=space-between,y=center)
|
||||
display: flex
|
||||
justify-content: x
|
||||
align-items: y
|
||||
|
||||
// 背景图片地址和大小
|
||||
_bis(url,w,h=auto,x=center,y=center)
|
||||
background-position: x y
|
||||
background-size: w h
|
||||
background-image: url(url)
|
||||
background-repeat: no-repeat
|
||||
|
||||
// 定位上下居中
|
||||
_ct()
|
||||
position: absolute
|
||||
top: 50%
|
||||
transform: translateY(-50%)
|
||||
|
||||
BIN
src/images/bg-button.png
Normal file
|
After Width: | Height: | Size: 66 KiB |
BIN
src/images/bg-center.png
Normal file
|
After Width: | Height: | Size: 896 KiB |
BIN
src/images/bg-left.png
Normal file
|
After Width: | Height: | Size: 32 KiB |
BIN
src/images/bg-m_2.png
Normal file
|
After Width: | Height: | Size: 44 KiB |
BIN
src/images/bg-right.png
Normal file
|
After Width: | Height: | Size: 29 KiB |
BIN
src/images/bg-title_2.png
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
src/images/bg.jpg
Normal file
|
After Width: | Height: | Size: 59 KiB |
BIN
src/images/bg1.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
src/images/bg2.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
src/images/bg3.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
src/images/bg4.png
Normal file
|
After Width: | Height: | Size: 166 B |
BIN
src/images/device/agv_gray.png
Normal file
|
After Width: | Height: | Size: 5.9 KiB |
BIN
src/images/device/agv_green.png
Normal file
|
After Width: | Height: | Size: 6.2 KiB |
BIN
src/images/device/agv_red.png
Normal file
|
After Width: | Height: | Size: 6.3 KiB |
BIN
src/images/device/agv_yellow.png
Normal file
|
After Width: | Height: | Size: 6.3 KiB |
BIN
src/images/device/arrow.png
Normal file
|
After Width: | Height: | Size: 534 B |
BIN
src/images/device/blj.png
Normal file
|
After Width: | Height: | Size: 7.2 KiB |
BIN
src/images/device/cdz.png
Normal file
|
After Width: | Height: | Size: 34 KiB |
BIN
src/images/device/cmdssj_gray.png
Normal file
|
After Width: | Height: | Size: 7.9 KiB |
BIN
src/images/device/cmdssj_green.png
Normal file
|
After Width: | Height: | Size: 8.3 KiB |
BIN
src/images/device/cmdssj_red.png
Normal file
|
After Width: | Height: | Size: 8.1 KiB |
BIN
src/images/device/cmdssj_yellow.png
Normal file
|
After Width: | Height: | Size: 7.4 KiB |
BIN
src/images/device/cpj_gray.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
src/images/device/cpj_green.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
src/images/device/cpj_red.png
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
src/images/device/cpj_yellow.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
src/images/device/crj_gray.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
src/images/device/crj_yellow.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
src/images/device/fmj2_gray.png
Normal file
|
After Width: | Height: | Size: 8.6 KiB |
BIN
src/images/device/fmj2_yellow.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
src/images/device/fmj_gray.png
Normal file
|
After Width: | Height: | Size: 7.7 KiB |
BIN
src/images/device/fmj_yellow.png
Normal file
|
After Width: | Height: | Size: 7.3 KiB |
BIN
src/images/device/gtssj_gray.png
Normal file
|
After Width: | Height: | Size: 5.5 KiB |
BIN
src/images/device/gtssj_yellow.png
Normal file
|
After Width: | Height: | Size: 5.7 KiB |
BIN
src/images/device/hj.png
Normal file
|
After Width: | Height: | Size: 3.6 KiB |
BIN
src/images/device/hjktp.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
src/images/device/hjmtp.png
Normal file
|
After Width: | Height: | Size: 7.9 KiB |
BIN
src/images/device/hlj_gray.png
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
src/images/device/hlj_green.png
Normal file
|
After Width: | Height: | Size: 36 KiB |
BIN
src/images/device/hlj_red.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
src/images/device/hlj_s_gray.png
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
src/images/device/hlj_s_green.png
Normal file
|
After Width: | Height: | Size: 30 KiB |
BIN
src/images/device/hlj_s_red.png
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
src/images/device/hlj_s_yellow.png
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
src/images/device/hlj_yellow.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
src/images/device/ktp_gray.png
Normal file
|
After Width: | Height: | Size: 8.9 KiB |
BIN
src/images/device/ktp_green.png
Normal file
|
After Width: | Height: | Size: 2.5 KiB |
BIN
src/images/device/ktp_red.png
Normal file
|
After Width: | Height: | Size: 2.5 KiB |
BIN
src/images/device/ktp_yellow.png
Normal file
|
After Width: | Height: | Size: 2.5 KiB |
BIN
src/images/device/ktpv_gray.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
src/images/device/ktpv_green.png
Normal file
|
After Width: | Height: | Size: 3.7 KiB |
BIN
src/images/device/ktpv_red.png
Normal file
|
After Width: | Height: | Size: 3.7 KiB |
BIN
src/images/device/ktpv_yellow.png
Normal file
|
After Width: | Height: | Size: 3.7 KiB |
BIN
src/images/device/ltssj_gray.png
Normal file
|
After Width: | Height: | Size: 7.5 KiB |
BIN
src/images/device/ltssj_green.png
Normal file
|
After Width: | Height: | Size: 7.9 KiB |
BIN
src/images/device/ltssj_yellow.png
Normal file
|
After Width: | Height: | Size: 7.2 KiB |
BIN
src/images/device/lz.png
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
src/images/device/lz_gray.png
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
src/images/device/lz_green.png
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
src/images/device/lz_hj_gray.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
src/images/device/lz_hj_green.png
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
src/images/device/lz_hj_red.png
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
src/images/device/lz_hj_yellow.png
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
src/images/device/lz_red.png
Normal file
|
After Width: | Height: | Size: 15 KiB |